In [1]:
from IPython.display import display
import arcgis
from arcgis.gis import GIS
import pandas as pd
pd.set_option('display.max_columns', 500)
from arcgis.features import FeatureLayer
from arcgis.mapping import WebMap
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import time
In [2]:
gis = GIS("https://datascienceqa.esri.com/portal", "portaladmin", "esri.agp", verify_cert=False)
# gis = GIS("https://datascienceqa.esri.com/portal", "portaladmin", "esri.agp")
In [4]:
# Layers Used
# Provider data layer
# provider_layer = FeatureLayer("https://datascienceqa.esri.com/server/rest/services/Hosted/provider_clean_data_geocoded_6_19/FeatureServer/0")
provider_layer = FeatureLayer("https://datascienceqa.esri.com/server/rest/services/Hosted/provider_data_geocoded_7_23/FeatureServer/0")

# Population Density
from arcgis.mapping import MapImageLayer
popdensity = MapImageLayer("https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer")

# Median Income
medIncome = MapImageLayer("https://datascienceqa.esri.com/portal/sharing/servers/3e5f8ebe5a114a61b7f350e7a1203761/rest/services/USA_Demographics_and_Boundaries_2018/MapServer")

# Median Age
medAge = MapImageLayer("https://datascienceqa.esri.com/portal/sharing/servers/e2558ac0c5e04235ad7820773e89d110/rest/services/USA_Demographics_and_Boundaries_2018/MapServer")

# Health Insurance Coverage
tx_insurance_state = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Health_Insurance_Boundaries/FeatureServer")
tx_insurance_county = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Health_Insurance_Boundaries/FeatureServer/1")
tx_insurance_tract = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Health_Insurance_Boundaries/FeatureServer/2")

# Fertility layers for State, County and Tract (Percent of women 15 to 50 who had a birth in the past 12 months)
fertility_state = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Fertility_by_Age_Boundaries/FeatureServer/0")
fertility_county = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Fertility_by_Age_Boundaries/FeatureServer/1")
fertility_tract = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Fertility_by_Age_Boundaries/FeatureServer/2")
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-1123c4387856> in <module>
      6 # Population Density
      7 from arcgis.mapping import MapImageLayer
----> 8 popdensity = MapImageLayer("https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer")
      9 
     10 # Median Income

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\mapping\_types.py in __init__(self, url, gis)
   1962         super(MapImageLayer, self).__init__(url, gis)
   1963 
-> 1964         self._populate_layers()
   1965         self._admin = None
   1966         try:

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\mapping\_types.py in _populate_layers(self)
   1979         tables = []
   1980 
-> 1981         for lyr in self.properties.layers:
   1982             if 'subLayerIds' in lyr and lyr.subLayerIds is not None: # Group Layer
   1983                 lyr = Layer(self.url + '/' + str(lyr.id), self._gis)

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\gis\__init__.py in properties(self)
   9534         else:
   9535             self._hydrate()
-> 9536             return self._lazy_properties
   9537 
   9538     @properties.setter

AttributeError: 'MapImageLayer' object has no attribute '_lazy_properties'

Get Provider Data

Provider data was geocoded using the GeoAnalytics server. Let's get the geocoded provider data feature layer for exploration.

In [3]:
# search_result = gis.content.search('title: npidata_Geocoded')
search_result = gis.content.search('title: provider_data_geocoded_7_30', 'Feature Layer')
In [4]:
provider_data_item = search_result[0]
provider_data_item
Out[4]:
provider_data_geocoded_7_30
Feature Layer Collection by portaladmin
Last Modified: July 30, 2019
0 comments, 26 views
In [5]:
provider_data_item.layers
Out[5]:
[<FeatureLayer url:"https://datascienceqa.esri.com/server/rest/services/Hosted/provider_data_geocoded_7_30/FeatureServer/0">]
In [6]:
provider_data_layer = provider_data_item.layers[0]
provider_data_layer
Out[6]:
<FeatureLayer url:"https://datascienceqa.esri.com/server/rest/services/Hosted/provider_data_geocoded_7_30/FeatureServer/0">
In [7]:
# Look at the fields and their data types
for f in provider_data_layer.properties.fields:
    print(f['name'],'      ',f['type'])
objectid        esriFieldTypeOID
user_npi        esriFieldTypeDouble
user_entity_type        esriFieldTypeString
user_organization_name        esriFieldTypeString
user_address        esriFieldTypeString
user_address2        esriFieldTypeString
user_city        esriFieldTypeString
user_region        esriFieldTypeString
user_postal        esriFieldTypeDouble
user_country        esriFieldTypeString
user_provider_gender        esriFieldTypeString
user_taxonomy_code_1        esriFieldTypeString
user_taxonomy_code_2        esriFieldTypeString
user_taxonomy_code_3        esriFieldTypeString
user_taxonomy_code_4        esriFieldTypeString
user_taxonomy_code_5        esriFieldTypeString
user_taxonomy_code_6        esriFieldTypeString
user_taxonomy_code_7        esriFieldTypeString
user_taxonomy_code_8        esriFieldTypeString
user_taxonomy_code_9        esriFieldTypeString
user_taxonomy_code_10        esriFieldTypeString
user_taxonomy_code_11        esriFieldTypeString
user_taxonomy_code_12        esriFieldTypeString
user_taxonomy_code_13        esriFieldTypeString
user_taxonomy_code_14        esriFieldTypeString
user_taxonomy_code_15        esriFieldTypeString
user_taxonomy_group_1        esriFieldTypeString
user_full_address        esriFieldTypeString
in_address        esriFieldTypeString
in_address2        esriFieldTypeString
in_city        esriFieldTypeString
in_postal        esriFieldTypeDouble
in_region        esriFieldTypeString
status        esriFieldTypeString
score        esriFieldTypeDouble
match_addr        esriFieldTypeString
addr_type        esriFieldTypeString
loc_name        esriFieldTypeString
longlabel        esriFieldTypeString
shortlabel        esriFieldTypeString
type        esriFieldTypeString
placename        esriFieldTypeString
place_addr        esriFieldTypeString
phone        esriFieldTypeString
url        esriFieldTypeString
rank        esriFieldTypeDouble
buildingname        esriFieldTypeString
addressnumber        esriFieldTypeString
addnumfrom        esriFieldTypeString
addnumto        esriFieldTypeString
addressrange        esriFieldTypeString
side        esriFieldTypeString
stpredir        esriFieldTypeString
stpretype        esriFieldTypeString
stname        esriFieldTypeString
sttype        esriFieldTypeString
stdir        esriFieldTypeString
bldgtype        esriFieldTypeString
bldgname        esriFieldTypeString
leveltype        esriFieldTypeString
levelname        esriFieldTypeString
unittype        esriFieldTypeString
unitname        esriFieldTypeString
subaddress        esriFieldTypeString
staddr        esriFieldTypeString
block        esriFieldTypeString
sector        esriFieldTypeString
neighborhood        esriFieldTypeString
district        esriFieldTypeString
city        esriFieldTypeString
metroarea        esriFieldTypeString
subregion        esriFieldTypeString
region        esriFieldTypeString
regionabbr        esriFieldTypeString
territory        esriFieldTypeString
zone        esriFieldTypeString
postal        esriFieldTypeString
postalext        esriFieldTypeString
country        esriFieldTypeString
langcode        esriFieldTypeString
distance        esriFieldTypeDouble
x        esriFieldTypeDouble
y        esriFieldTypeDouble
displayx        esriFieldTypeDouble
displayy        esriFieldTypeDouble
x_min        esriFieldTypeDouble
x_max        esriFieldTypeDouble
y_min        esriFieldTypeDouble
y_max        esriFieldTypeDouble
extrainfo        esriFieldTypeString
In [9]:
# Check number of records in `provider_data_layer`
provider_data_layer.query(return_count_only=True)
Out[9]:
5943659

Check Geocoding

Let's do a random test to check geocoded data. For a given state, we will look at and plot the data points based on address provided vs address geocoded.

Geocoding Check: Wyoming

In [42]:
# Create a spatially enabled dataframe for WY
%time wy_df = provider_data_layer.query(where="user_Region='WY'", as_df=True)
# %time wy_df = provider_data_layer.query(where="USER_Provider_Business_Practice_Location_Address_State_Name='WY'", as_df=True)

wy_df.shape
Wall time: 54.3 s
Out[42]:
(12770, 91)
In [48]:
# Look at data points that are geocoded outside of Wyoming
len(wy_df[wy_df['region']!='Wyoming'])
Out[48]:
3
In [44]:
# Check the accuracy of geocoding
round(100-((wy_df.shape[1]/wy_df.shape[0])*100),2)
Out[44]:
99.29
In [45]:
map1 = gis.map('USA')
map1
In [46]:
# Plot data points for WY
wy_df.spatial.plot(map1)
Out[46]:
True
In [49]:
map1.take_screenshot()
In [36]:
map1.remove_layers()
Out[36]:
True

We have an accuracy of >99% with geocoding. From this map, we can see that out of 12770 points that have been geocoded only 3 are outside of WY. Similar analysis can be performed for other states to check for geocoding errors.

Geocoding Check: Arizona

In [14]:
# Create a spatially enabled dataframe for AZ
# %time az_df = provider_data_layer.query(where="user_Region='AZ'", as_df=True)
%time az_df = provider_data_layer.query(where="USER_Provider_Business_Practice_Location_Address_State_Name='AZ'", as_df=True)

az_df.shape
Wall time: 19min
Out[14]:
(108774, 368)
In [15]:
# Look at data points that are geocoded outside of Arizona
len(az_df[az_df['Region']!='Arizona'])
Out[15]:
7582

Geocoding Check: Texas

In [129]:
# Create a spatially enabled dataframe for TX
%time tx_df = provider_data_layer.query(where="user_Region='TX'", as_df=True)
tx_df.shape
Wall time: 4min
Out[129]:
(365783, 93)
In [130]:
# Look at data points that are geocoded outside of Texas
len(tx_df[tx_df['Region']!='Texas'])
Out[130]:
17

Data Exploration

Heatmap of Providers in U.S.

To visualize how healthcare providers are distributed, let's do a heatmap of providers in the United States.

In [115]:
map_usa = gis.map('USA')
map_usa
In [116]:
# Add provider data and create a heatmap
usa_layer = FeatureLayer("https://datascienceqa.esri.com/server/rest/services/Hosted/provider_clean_data_geocoded_6_19/FeatureServer")
renderer = {"renderer": "autocast", #This tells python to use JS autocasting
            "type": "heatmap",
#             "minScale":100,
#             "maxScale":10,
            "blurRadius":1,  # changes the size of the clusters
            "maxPixelIntensity":2,
            "minPixelIntensity":0,
            "field":None}
renderer["colorStops"] = [{"ratio":0,"color":[63, 40, 102, 0]},
                          {"ratio":0.25,"color":[167,97,170,179]},
                          {"ratio":0.50,"color":"#7b3ce9"},
                          {"ratio":0.75,"color":[222,102,0,179]},
                          {"ratio":1,"color":[244,204,0,179]}]
#                           {"ratio":1,"color":"#ffff00"}]
map_usa.add_layer(usa_layer,
               { "type": "FeatureLayer",
                 "renderer": renderer,
                })
In [117]:
map_usa.legend = True
In [120]:
map_usa.remove_layers()
Out[120]:
True
In [119]:
map_usa.take_screenshot(set_as_preview=True)

The map shows distribution of providers throughout the US. We can see large gaps in Nevada, Idaho, Utah, Wyoming and Texas. These and other states can be explored further for analysis.

The Lone Star State - Exploring Texas

The second largest state in U.S. both by area and population, Texas baosts of 261,231.71 sq mi land area with a population of ~28.7 million. The population density is low with just 105.2 people per square mile and varies drastically between heavely populated urban areas to sparsely populated rural.

Image source: https://www.npr.org/sections/thetwo-way/2018/05/24/614195884/new-census-data-shows-texas-cities-are-growing-faster-than-all-other-states

As seen in the previous notebook, Texas has the fourth largest number of healthcare providers in U.S. However, the state stands second highest on Health Resources and Services Administration's (HRSA) list of shortage areas. Texas also tops HRSA's list of medically underserved areas.

Let's start our journey with Texas!

Providers and Population Density

In [39]:
# Search for Population data layer
popsearch_result = gis.content.search('title: 2018 USA Population Density')
popsearch_result
Out[39]:
[<Item title:"2018 USA Tapestry Segmentation" type:Map Image Layer owner:esri_livingatlas>,
 <Item title:"2018 USA Population Density" type:Map Image Layer owner:esri_livingatlas>]
In [40]:
# Get Population Density
popdensity = popsearch_result[1]
popdensity
Out[40]:
2018 USA Population Density
This layer shows the population density in the United States in 2018 in persons per square mile in a multiscale map by country, state, county, ZIP Code, tract, and block group. ArcGIS Online subscription required.Map Image Layer by esri_livingatlas
Last Modified: July 19, 2019
0 comments, 6 views

Let's bring the 2018 USA Population Density and Provider Data layers together to explore providers with respect to population density.

In [185]:
# Create Map
tx_pop_map = gis.map('USA')
tx_pop_map

We will use ClassedColorRenderer, a Smart Mapping feature, to automatically generate color classes for population density. The renderer is then applied to different State, City, County, Tract and Block Group layers of the population density layer.

In [186]:
# Add population density for Texas
for layer in popdensity.layers:
#     if "43" in layer.url or "44" in layer.url:
    if layer.properties['id'] in [43,44,45,46,47,48,49]:
        tx_pop_map.add_layer(layer, {  "type": "FeatureLayer",
                                 "renderer":"ClassedColorRenderer",
#                                  "definition_expression" : "STATE_NAME='Utah' or STATE_NAME='Nevada' or STATE_NAME='Idaho' or STATE_NAME='Wyoming'",
                                 "definition_expression" : "STATE_NAME='Texas'",
                                 "opacity":0.7,
                                 "field_name":"POPDENS_CY"})

We will now plot healthcare providers as points on top of the population density layer.

In [187]:
# Add provider data layer for Texas
tx_pop_map.add_layer(provider_data_layer,
               { "type": "FeatureLayer",
                "definition_expression" : "Region = 'Texas'",
                "opacity":0.7})
In [188]:
# Add Legend
tx_pop_map.legend = True
In [190]:
tx_pop_map.remove_layers()
Out[190]:
True
In [189]:
tx_pop_map.take_screenshot()

Providers and Median Income

Let's bring the 2018 USA Median Household Income and Provider Data layers together to explore providers with respect to median income.

In [191]:
# Create Map
tx_income_map = gis.map('USA', 6)
tx_income_map

We will use ClassedColorRenderer, a Smart Mapping feature, to automatically generate color classes for median income. The renderer is then applied to different State, City, County, Tract and Block Group levels. We will use the median household income variable of the Census Data layer for this analysis.

In [192]:
# Add Median Household Income for Texas
for layer in popdensity.layers:
    if layer.properties['id'] in [43,44,45,46,47,48,49]:
        tx_income_map.add_layer(layer, {  "type": "FeatureLayer",
                                 "renderer":"ClassedColorRenderer",
                                 "definition_expression" : "STATE_NAME='Texas'",
                                 "opacity":0.7,
                                 "field_name":"MEDHINC_CY"})
In [193]:
# Add provider data layer for Texas
tx_income_map.add_layer(provider_data_layer,
               { "type": "FeatureLayer",
                "definition_expression" : "Region = 'Texas'",
                "opacity":0.7})
In [194]:
# Add Legend
tx_income_map.legend = True
In [196]:
tx_income_map.remove_layers()
Out[196]:
True
In [195]:
tx_income_map.take_screenshot()

Providers and Median Age

Let's bring the 2018 USA Median Age and Provider Data layers together to explore providers with respect to median age.

In [197]:
# Create Map
tx_age_map = gis.map('USA', 6)
tx_age_map

We will use ClassedColorRenderer, a Smart Mapping feature, to automatically generate color classes for median income. The renderer is then applied to different State, City, County, Tract and Block Group levels. We will use the median age for current year (2018) variable of the Census Data layer for this analysis.

In [198]:
# Add Median Age for Texas
for layer in popdensity.layers:
#     if "43" in layer.url or "44" in layer.url:
    if layer.properties['id'] in [43,44,45,46,47,48,49]:
        tx_age_map.add_layer(layer, {  "type": "FeatureLayer",
                                 "renderer":"ClassedColorRenderer",
                                 "definition_expression" : "STATE_NAME='Texas'",
                                 "opacity":0.7,
                                 "field_name":"MEDAGE_CY"})
In [199]:
# Add provider data layer for Texas
tx_age_map.add_layer(provider_data_layer,
               { "type": "FeatureLayer",
                "definition_expression" : "Region = 'Texas'",
                "opacity":0.7})
In [200]:
# Add Legend
tx_age_map.legend = True
In [202]:
tx_age_map.remove_layers()
Out[202]:
True
In [201]:
tx_age_map.take_screenshot()

Providers and Percent of Total Population with no Health Insurance Coverage

Let's bring the Health Insurance Coverage Data and Provider Data layers together to explore providers with respect to percent of total population with no Health Insurance Coverage.

In [203]:
# Create Map
tx_insurance_map = gis.map('USA')
tx_insurance_map

This map shows a troubling picture of numerous counties with very few provders where percentage of population with no health insurance is among the highest in Texas. Some of the counties include:

  • South and Southwest Texas: Frio, La Salle, Dimmit, Webb, Maverick, Kennedy, Willacy, Starr
  • Central Texas: Val Verde, Crockett, Regan, Stephens, Eastland, Callahan
  • West Texas: Hudspeth, Presidio, Winkler, Ector
  • North: Dallam, Sherman, Potter, Bailey, Cochran

We will use ClassedColorRenderer, a Smart Mapping feature, to automatically generate color classes for population with no health insurance. The renderer is then applied to different State, County and Tract layers of data.

In [204]:
# Add Health Insurance Coverage layers for State, County and Tract
from arcgis.mapping import MapImageLayer
tx_insurance_state = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Health_Insurance_Boundaries/FeatureServer")
tx_insurance_county = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Health_Insurance_Boundaries/FeatureServer/1")
tx_insurance_tract = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Health_Insurance_Boundaries/FeatureServer/2")

tx_insurance_map.add_layer(tx_insurance_state,
               { "type": "FeatureLayer",
                "definition_expression" : "Name = 'Texas'",
                "field_name":"B27010_calc_pctNoInsE",
                "renderer":"ClassedColorRenderer",
                "opacity":0.7})

tx_insurance_map.add_layer(tx_insurance_county,
               { "type": "FeatureLayer",
                "definition_expression" : "STATE = 'Texas'",
                "renderer":"ClassedColorRenderer",
                "field_name":"B27010_calc_pctNoInsE",
                "opacity":0.7})

tx_insurance_map.add_layer(tx_insurance_tract,
               { "type": "FeatureLayer",
                "definition_expression" : "State = 'Texas'",
                "renderer":"ClassedColorRenderer",
                "field_name":"B27010_calc_pctNoInsE",
                "opacity":0.7})
In [205]:
# Add provider data layer for Texas
tx_insurance_map.add_layer(provider_data_layer,
               { "type": "FeatureLayer",
                "definition_expression" : "Region = 'Texas'",
                "opacity":0.7})
In [206]:
# Add Legend
tx_insurance_map.legend = True
In [208]:
tx_insurance_map.remove_layers()
Out[208]:
True
In [207]:
tx_insurance_map.take_screenshot()
In [104]:
state_layer.properties
---------------------------------------------------------------------------
gaierror                                  Traceback (most recent call last)
~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args)
   1316                 h.request(req.get_method(), req.selector, req.data, headers,
-> 1317                           encode_chunked=req.has_header('Transfer-encoding'))
   1318             except OSError as err: # timeout error

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in request(self, method, url, body, headers, encode_chunked)
   1228         """Send a complete request to the server."""
-> 1229         self._send_request(method, url, body, headers, encode_chunked)
   1230 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked)
   1274             body = _encode(body, 'body')
-> 1275         self.endheaders(body, encode_chunked=encode_chunked)
   1276 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in endheaders(self, message_body, encode_chunked)
   1223             raise CannotSendHeader()
-> 1224         self._send_output(message_body, encode_chunked=encode_chunked)
   1225 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in _send_output(self, message_body, encode_chunked)
   1015         del self._buffer[:]
-> 1016         self.send(msg)
   1017 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in send(self, data)
    955             if self.auto_open:
--> 956                 self.connect()
    957             else:

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in connect(self)
   1383 
-> 1384             super().connect()
   1385 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in connect(self)
    927         self.sock = self._create_connection(
--> 928             (self.host,self.port), self.timeout, self.source_address)
    929         self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\socket.py in create_connection(address, timeout, source_address)
    706     err = None
--> 707     for res in getaddrinfo(host, port, 0, SOCK_STREAM):
    708         af, socktype, proto, canonname, sa = res

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\socket.py in getaddrinfo(host, port, family, type, proto, flags)
    747     addrlist = []
--> 748     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
    749         af, socktype, proto, canonname, sa = res

gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

URLError                                  Traceback (most recent call last)
<ipython-input-104-c9a48188431f> in <module>
----> 1 state_layer.properties

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\gis\__init__.py in properties(self)
   9533             return self._lazy_properties
   9534         else:
-> 9535             self._hydrate()
   9536             return self._lazy_properties
   9537 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\gis\__init__.py in _hydrate(self)
   9552                 else:
   9553                     if isinstance(self._con, arcgis._impl._ArcGISConnection):
-> 9554                         self._lazy_token = self._con.generate_portal_server_token(self._url)
   9555                     else:
   9556                         self._lazy_token = self._con.token

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\_impl\connection.py in generate_portal_server_token(self, serverUrl, expiration)
    533             if self.baseurl.endswith('/'):
    534                 resp = self.post('generateToken', postdata,
--> 535                                  ssl=True, add_token=False)
    536             else:
    537                 resp = self.post('/generateToken', postdata,

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\_impl\connection.py in post(self, path, postdata, files, ssl, compress, is_retry, use_ordered_dict, add_token, verify_cert, token, try_json, out_folder, file_name, force_bytes, add_headers)
   1123             opener.addheaders = headers
   1124             #print("***"+url)
-> 1125             resp = opener.open(url, data=encoded_postdata.encode())
   1126             resp_data, is_file = self._process_response(resp,
   1127                                                out_folder=out_folder,

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in open(self, fullurl, data, timeout)
    523             req = meth(req)
    524 
--> 525         response = self._open(req, data)
    526 
    527         # post-process response

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in _open(self, req, data)
    541         protocol = req.type
    542         result = self._call_chain(self.handle_open, protocol, protocol +
--> 543                                   '_open', req)
    544         if result:
    545             return result

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args)
    501         for handler in handlers:
    502             func = getattr(handler, meth_name)
--> 503             result = func(*args)
    504             if result is not None:
    505                 return result

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in https_open(self, req)
   1358         def https_open(self, req):
   1359             return self.do_open(http.client.HTTPSConnection, req,
-> 1360                 context=self._context, check_hostname=self._check_hostname)
   1361 
   1362         https_request = AbstractHTTPHandler.do_request_

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args)
   1317                           encode_chunked=req.has_header('Transfer-encoding'))
   1318             except OSError as err: # timeout error
-> 1319                 raise URLError(err)
   1320             r = h.getresponse()
   1321         except:

URLError: <urlopen error [Errno 11001] getaddrinfo failed>
In [101]:
from arcgis.geoanalytics import summarize_data
provider_state_agg = summarize_data.aggregate_points(point_layer = provider_data_layer,
                                            polygon_layer = state_layer,
                                            output_name='provider_state_agg',
                                            summary_fields=[{"statisticType": "Count", "onStatisticField": "user_npi"}])
---------------------------------------------------------------------------
gaierror                                  Traceback (most recent call last)
~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args)
   1316                 h.request(req.get_method(), req.selector, req.data, headers,
-> 1317                           encode_chunked=req.has_header('Transfer-encoding'))
   1318             except OSError as err: # timeout error

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in request(self, method, url, body, headers, encode_chunked)
   1228         """Send a complete request to the server."""
-> 1229         self._send_request(method, url, body, headers, encode_chunked)
   1230 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked)
   1274             body = _encode(body, 'body')
-> 1275         self.endheaders(body, encode_chunked=encode_chunked)
   1276 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in endheaders(self, message_body, encode_chunked)
   1223             raise CannotSendHeader()
-> 1224         self._send_output(message_body, encode_chunked=encode_chunked)
   1225 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in _send_output(self, message_body, encode_chunked)
   1015         del self._buffer[:]
-> 1016         self.send(msg)
   1017 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in send(self, data)
    955             if self.auto_open:
--> 956                 self.connect()
    957             else:

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in connect(self)
   1383 
-> 1384             super().connect()
   1385 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\http\client.py in connect(self)
    927         self.sock = self._create_connection(
--> 928             (self.host,self.port), self.timeout, self.source_address)
    929         self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\socket.py in create_connection(address, timeout, source_address)
    706     err = None
--> 707     for res in getaddrinfo(host, port, 0, SOCK_STREAM):
    708         af, socktype, proto, canonname, sa = res

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\socket.py in getaddrinfo(host, port, family, type, proto, flags)
    747     addrlist = []
--> 748     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
    749         af, socktype, proto, canonname, sa = res

gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

URLError                                  Traceback (most recent call last)
<ipython-input-101-b45a3f4a1ef5> in <module>
      3                                             polygon_layer = state_layer,
      4                                              output_name='provider_state_agg',
----> 5                                             summary_fields=[{"statisticType": "Count", "onStatisticField": "user_npi"}])

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\geoanalytics\summarize_data.py in aggregate_points(point_layer, bin_type, bin_size, bin_size_unit, polygon_layer, time_step_interval, time_step_interval_unit, time_step_repeat_interval, time_step_repeat_interval_unit, time_step_reference, summary_fields, output_name, gis)
    283         output_service_name = output_name.replace(' ', '_')
    284 
--> 285     output_service = _create_output_service(gis, output_name, output_service_name, 'Aggregate Points')
    286 
    287     params['output_name'] = _json.dumps({

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\geoanalytics\_util.py in _create_output_service(gis, output_name, output_service_name, task)
     80 
     81 def _create_output_service(gis, output_name, output_service_name='Analysis feature service', task='GeoAnalytics'):
---> 82     ok = gis.content.is_service_name_available(output_name, 'Feature Service')
     83     if not ok:
     84         raise RuntimeError("A Feature Service by this name already exists: " + output_name)

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\gis\__init__.py in is_service_name_available(self, service_name, service_type)
   4111         }
   4112 
-> 4113         res = self._portal.con.post(path, postdata)
   4114         return res['available']
   4115 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\_impl\connection.py in post(self, path, postdata, files, ssl, compress, is_retry, use_ordered_dict, add_token, verify_cert, token, try_json, out_folder, file_name, force_bytes, add_headers)
   1123             opener.addheaders = headers
   1124             #print("***"+url)
-> 1125             resp = opener.open(url, data=encoded_postdata.encode())
   1126             resp_data, is_file = self._process_response(resp,
   1127                                                out_folder=out_folder,

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in open(self, fullurl, data, timeout)
    523             req = meth(req)
    524 
--> 525         response = self._open(req, data)
    526 
    527         # post-process response

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in _open(self, req, data)
    541         protocol = req.type
    542         result = self._call_chain(self.handle_open, protocol, protocol +
--> 543                                   '_open', req)
    544         if result:
    545             return result

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args)
    501         for handler in handlers:
    502             func = getattr(handler, meth_name)
--> 503             result = func(*args)
    504             if result is not None:
    505                 return result

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in https_open(self, req)
   1358         def https_open(self, req):
   1359             return self.do_open(http.client.HTTPSConnection, req,
-> 1360                 context=self._context, check_hostname=self._check_hostname)
   1361 
   1362         https_request = AbstractHTTPHandler.do_request_

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args)
   1317                           encode_chunked=req.has_header('Transfer-encoding'))
   1318             except OSError as err: # timeout error
-> 1319                 raise URLError(err)
   1320             r = h.getresponse()
   1321         except:

URLError: <urlopen error [Errno 11001] getaddrinfo failed>

Mental Health

Image source: https://cuindependent.com/2019/03/08/opinion-mental-health-education/

Mental Healthcare Providers - Heat Map

Let's explore the distribution of mental health providers in US using a heatmap.

In [75]:
mental_map = gis.map('USA')
mental_map

This map paints a grim picture of the availability of mental healthcare providers. There are states in every region with vast areas of NO mental health providers or very few providers. To list, some of these states include:

  • Midwest: The Dakotas, Montana, Wyoming, Colorado, Nebraska, Kansas
  • South: Texas, New Mexico, Kansas, Louisiana, Mississippi, Alabama
  • West: Nevada, Arizona, Oregon, Idaho, Alaska
  • East: Maine, Vermont, Michigan
In [76]:
renderer = {"renderer": "autocast", #This tells python to use JS autocasting
            "type": "heatmap",
            "blurRadius":1,  # changes the size of the clusters
            "maxPixelIntensity":2,
            "minPixelIntensity":0,
            "field":None}
renderer["colorStops"] = [{"ratio":0,"color":[63, 40, 102, 0]},
                          {"ratio":0.25,"color":[167,97,170,179]},
                          {"ratio":0.50,"color":"#7b3ce9"},
                          {"ratio":0.75,"color":[222,102,0,179]},
                          {"ratio":1,"color":[244,204,0,179]}]
mental_map.add_layer(provider_data_layer,
               { "type": "FeatureLayer",
                 "renderer": renderer,
                "definition_expression" : "user_taxonomy_code_1 in ['2084P0800X','207QG0300X','273R00000X','103T00000X','103TA0400X','103TA0700X','103TC0700X','103TC2200X','103TB0200X','103TC1900X','103TE1000X','103TE1100X','103TF0000X','103TF0200X','103TP2701X','103TH0004X','103TH0100X','103TM1700X','103TM1800X','103TP0016X','103TP0814X','103TP2700X','103TR0400X','103TS0200X','103TW0100X','106E00000X','106S00000X','2084A0401X','2084P0802X','2084B0002X','2084P0804X','2084N0600X','2084D0003X','2084F0202X','2084P0805X','2084H0002X','2084P0005X','2084N0400X','2084N0402X','2084N0008X','2084P2900X','2084P0015X','2084S0012X','2084S0010X','2084V0102X','364SP0808X','364SP0809X','364SP0807X','364SP0810X','364SP0811X','364SP0812X','364SP0813X','283Q00000X','261QM0801X']"
               })
In [88]:
mental_map.remove_layers()
Out[88]:
True
In [77]:
mental_map.take_screenshot()
In [ ]:
 

Mental Healthcare Providers and Population Density

Let's get census data from USA_Demographics_and_Boundaries_2018 layer. We will use 'Pop per Square Mile' as the variable to create our basemap and add providers as points on top.

In [170]:
# Search for Population data layer
popsearch_result = gis.content.search('title: 2018 USA Population Density')
popsearch_result
Out[170]:
[<Item title:"2018 USA Tapestry Segmentation" type:Map Image Layer owner:esri_livingatlas>,
 <Item title:"2018 USA Population Density" type:Map Image Layer owner:esri_livingatlas>]
In [171]:
# Get Population Density
popdensity = popsearch_result[1]
popdensity
Out[171]:
2018 USA Population Density
This layer shows the population density in the United States in 2018 in persons per square mile in a multiscale map by country, state, county, ZIP Code, tract, and block group. ArcGIS Online subscription required.Map Image Layer by esri_livingatlas
Last Modified: July 19, 2019
0 comments, 5 views
In [85]:
mental_map2 = gis.map('USA')
mental_map2

From this map, we can see that percent of women (15 to 50) who had a birth in the past 12 months is high in Idaho, Utah, North Dakota, South Dakota and Nebraska.

In [88]:
# Add population density layer
for layer in popdensity.layers:
#     if "43" in layer.url or "44" in layer.url:
    if layer.properties['id'] in [43,44,45,46,47,48,49]:
        mental_map2.add_layer(layer, {  "type": "FeatureLayer",
                                 "renderer":"ClassedColorRenderer",
# #                                  "definition_expression" : "STATE_NAME='Utah' or STATE_NAME='Nevada' or STATE_NAME='Idaho' or STATE_NAME='Wyoming'",
#                                  "definition_expression" : "STATE_NAME='Texas'",
                                 "opacity":0.7,
                                 "field_name":"POPDENS_CY"})
In [89]:
# Add Mental Healthcare Provider Data
mental_map2.add_layer(provider_data_layer,
                       {"type":"FeatureLayer",
                        "definition_expression":"user_taxonomy_code_1 in ['2084P0800X','207QG0300X','273R00000X','103T00000X','103TA0400X','103TA0700X','103TC0700X','103TC2200X','103TB0200X','103TC1900X','103TE1000X','103TE1100X','103TF0000X','103TF0200X','103TP2701X','103TH0004X','103TH0100X','103TM1700X','103TM1800X','103TP0016X','103TP0814X','103TP2700X','103TR0400X','103TS0200X','103TW0100X','106E00000X','106S00000X','2084A0401X','2084P0802X','2084B0002X','2084P0804X','2084N0600X','2084D0003X','2084F0202X','2084P0805X','2084H0002X','2084P0005X','2084N0400X','2084N0402X','2084N0008X','2084P2900X','2084P0015X','2084S0012X','2084S0010X','2084V0102X','364SP0808X','364SP0809X','364SP0807X','364SP0810X','364SP0811X','364SP0812X','364SP0813X','283Q00000X','261QM0801X']",
                        "opacity":0.7})
In [66]:
mental_map2.remove_layers()
Out[66]:
True
In [90]:
mental_map2.legend = True
In [91]:
mental_map2.take_screenshot()
In [92]:
popdensity.layers
Out[92]:
[<FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/0">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/1">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/2">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/3">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/4">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/5">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/6">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/7">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/8">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/9">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/10">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/11">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/12">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/13">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/14">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/15">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/16">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/17">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/18">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/19">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/20">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/21">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/22">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/23">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/24">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/25">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/26">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/27">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/28">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/29">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/30">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/31">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/32">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/33">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/34">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/35">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/36">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/37">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/38">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/39">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/40">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/41">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/42">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/43">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/44">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/45">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/46">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/47">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/48">,
 <FeatureLayer url:"https://datascienceqa.esri.com/portal/sharing/servers/ab4e1996d588405d9cd68348ef660f70/rest/services/USA_Demographics_and_Boundaries_2018/MapServer/49">]

Population to Providers Ratio by State

Let's find out the ratio of population to mental healthcare providers to understand which states have the least number of providers.

Dataframe for population by State

We will use the fertility layer at state level to create this dataframe

In [95]:
# State population dataframe
state_layer = popdensity.layers[43]
state_featureset = state_layer.query(out_fields='STATE_NAME,ST_ABBREV,TOTPOP_CY')
state_df = state_featureset.sdf
state_df.head()
Out[95]:
OBJECTID SHAPE STATE_NAME ST_ABBREV TOTPOP_CY
0 1 {"rings": [[[-9747504.6398, 3539549.5786999986... Alabama AL 4968383
1 2 {"rings": [[[-19677908.5389, 6763775.151000001... Alaska AK 750876
2 3 {"rings": [[[-12138852.7978, 4438964.613399997... Arizona AZ 7132147
3 4 {"rings": [[[-9989041.8861, 4300705.307499997]... Arkansas AR 3067536
4 5 {"rings": [[[-13038833.5744, 3845968.519900001... California CA 39806791

Dataframe for Mental Healthcare providers by state

We will use provider_data_layer to subset mental healthcare providers

In [96]:
# Get provider data for mental healthcare providers only

mental_featureset = provider_data_layer.query(where="user_taxonomy_code_1 in ['2084P0800X','207QG0300X','273R00000X','103T00000X','103TA0400X','103TA0700X','103TC0700X','103TC2200X','103TB0200X','103TC1900X','103TE1000X','103TE1100X','103TF0000X','103TF0200X','103TP2701X','103TH0004X','103TH0100X','103TM1700X','103TM1800X','103TP0016X','103TP0814X','103TP2700X','103TR0400X','103TS0200X','103TW0100X','106E00000X','106S00000X','2084A0401X','2084P0802X','2084B0002X','2084P0804X','2084N0600X','2084D0003X','2084F0202X','2084P0805X','2084H0002X','2084P0005X','2084N0400X','2084N0402X','2084N0008X','2084P2900X','2084P0015X','2084S0012X','2084S0010X','2084V0102X','364SP0808X','364SP0809X','364SP0807X','364SP0810X','364SP0811X','364SP0812X','364SP0813X','283Q00000X','261QM0801X']", 
                          out_fields='user_npi,user_entity_type,user_provider_gender,user_taxonomy_code_1,user_full_address,Postal,City,Subregion,Region,RegionAbbr')
mental_df = mental_featureset.sdf
mental_df.head()
Out[96]:
City OBJECTID Postal Region RegionAbbr SHAPE Subregion user_entity_type user_full_address user_npi user_provider_gender user_taxonomy_code_1
0 Kailua 50 96734 Hawaii HI {"x": -157.75842118599996, "y": 21.38069594300... City and County of Honolulu Individual 642 ULUKAHIKI ST, SUITE 300, KAILUA, HI 967344400 1366445306 M 2084N0400X
1 Rialto 110 92376 California CA {"x": -117.35748267199995, "y": 34.09373249300... San Bernardino County Individual 648 E GLEN OAK ST, , RIALTO, CA 923766648 1760500664 F 103T00000X
2 Colorado Springs 113 80903 Colorado CO {"x": -104.81990027499995, "y": 38.84235050400... El Paso County Individual 224 E WILLAMETTE AVE, , COLORADO SPRINGS, CO 8... 1023011046 M 103T00000X
3 Miami 118 33134 Florida FL {"x": -80.26657097299994, "y": 25.771643515000... Miami-Dade County Organization 4343 W FLAGLER ST STE 100, , CORAL GABLES, FL ... 1942507769 None 2084P0800X
4 Tamuning 122 96913 Guam GU {"x": 144.7754183520001, "y": 13.5051031310000... Individual 790 GOV. CARLOS G. CAMACHO RD., , TAMUNING, GU... 1508862269 M 2084P0800X
In [97]:
# Create dataframe of mental healthcare provider counts by state
mental_count_df = pd.DataFrame(mental_df['RegionAbbr'].value_counts().reset_index().values, columns=['RegionAbbr','Provider_Count'])
In [100]:
# Plot mental healthcare Providers by State

plt.figure(figsize=(25,12))
sns.barplot(mental_count_df['RegionAbbr'].iloc[:-19], mental_count_df['Provider_Count'].iloc[:-19])
plt.title('Mental Healthcare Providers by State', fontsize=22)
plt.xlabel('States', fontsize=18)
plt.ylabel('Provider Count', fontsize=18)
Out[100]:
Text(0, 0.5, 'Provider Count')

Merge Provider Count and Population Dataframes

In [101]:
# Merge provider count and women_df at state level
state_mental_df = pd.merge(mental_count_df,state_df,left_on='RegionAbbr', right_on='ST_ABBREV',how='inner')
In [102]:
state_mental_df.head()
Out[102]:
RegionAbbr Provider_Count OBJECTID SHAPE STATE_NAME ST_ABBREV TOTPOP_CY
0 CA 51820 5 {'rings': [[[-13038833.5744, 3845968.519900001... California CA 39806791
1 NY 23808 33 {'rings': [[[-8259979.4246, 4949745.592100002]... New York NY 20070143
2 FL 22890 10 {'rings': [[[-9124037.3451, 2817150.9723999985... Florida FL 20875686
3 MI 18107 23 {'rings': [[[-9291127.6781, 5121002.034400001]... Michigan MI 10057191
4 TX 13623 44 {'rings': [[[-10822386.4159, 2999262.775600001... Texas TX 28954616
In [103]:
# Create new columns that shows people per provider
state_mental_df['people_per_prov'] = state_mental_df['TOTPOP_CY']/state_mental_df['Provider_Count']
In [105]:
# Arrange dataframe by mother_per_prov descending
state_mental_df = state_mental_df.sort_values(by=['people_per_prov'], ascending=False)
state_mental_df.head()
Out[105]:
RegionAbbr Provider_Count OBJECTID SHAPE STATE_NAME ST_ABBREV TOTPOP_CY people_per_prov
43 MS 1108 25 {'rings': [[[-9952997.0803, 3545020.2216000035... Mississippi MS 3051594 2754.15
33 AL 2030 1 {'rings': [[[-9747504.6398, 3539549.5786999986... Alabama AL 4968383 2447.48
37 IA 1396 16 {'rings': [[[-10154309.0285, 5388473.678900003... Iowa IA 3219046 2305.91
45 ID 790 13 {'rings': [[[-12362299.9589, 5539778.200800002... Idaho ID 1760131 2228.01
4 TX 13623 44 {'rings': [[[-10822386.4159, 2999262.775600001... Texas TX 28954616 2125.42
In [107]:
# Plot No. of Mothers (age 15 to 50) per OB-GYN Provider by State

plt.figure(figsize=(25,12))
sns.barplot(state_mental_df['RegionAbbr'], state_mental_df['people_per_prov'])
plt.title('No. of People per Mental Heathcare Provider by State', fontsize=22)
plt.xlabel('States', fontsize=18)
plt.ylabel('No. of People', fontsize=18)
plt.xticks(fontsize=15)
plt.yticks(fontsize=15)
Out[107]:
(array([   0.,  500., 1000., 1500., 2000., 2500., 3000.]),
 <a list of 7 Text yticklabel objects>)

On average, there were ~2754 people per mental healthcare provider in Mississippi compared to ~364 people per provider in DC. The difference is drastic.

In [ ]:
 

Exploring Mississippi

Mississippi has the highest number of people per mental healthcare provider. Let's explore Mississippi to find out which counties have the lowest number of providers.

Dataframe for Population in Mississippi

In [123]:
# County population df
county_layer = popdensity.layers[46]
MS_featureset = county_layer.query(where="ST_ABBREV='MS'", out_fields='ST_ABBREV,NAME,TOTPOP_CY')
MS_pop_df = MS_featureset.sdf
MS_pop_df.head()
Out[123]:
NAME OBJECTID SHAPE ST_ABBREV TOTPOP_CY
0 Adams County 1402 {"rings": [[[-10195353.0856, 3667011.907600000... MS 31455
1 Alcorn County 1403 {"rings": [[[-9838473.3692, 4163284.5766000003... MS 37398
2 Amite County 1404 {"rings": [[[-10139507.6094, 3675190.789200000... MS 12573
3 Attala County 1405 {"rings": [[[-9957952.5787, 3933319.5100999996... MS 19195
4 Benton County 1406 {"rings": [[[-9917285.3423, 4109418.0692000017... MS 8621

Dataframe for Mental Healthcare Providers in Mississippi by County

In [133]:
# Get provider data for obgyn providers only
mental_MS_df = mental_df[mental_df['RegionAbbr']=='MS']
mental_MS_df.head()
mental_MS_df.shape
Out[133]:
(1108, 12)
In [134]:
# Create dataframe of obgyn provider counts by county
mental_MScounty_df = pd.DataFrame(mental_MS_df['Subregion'].value_counts().reset_index().values, columns=['County','Provider_Count'])
mental_MScounty_df.head()
Out[134]:
County Provider_Count
0 Hinds County 274
1 Harrison County 143
2 Rankin County 81
3 Lamar County 76
4 Lauderdale County 52
In [136]:
mental_MScounty_df
Out[136]:
County Provider_Count
0 Hinds County 274
1 Harrison County 143
2 Rankin County 81
3 Lamar County 76
4 Lauderdale County 52
5 Forrest County 51
6 Madison County 48
7 Lee County 45
8 Jackson County 43
9 Lafayette County 40
10 DeSoto County 33
11 Alcorn County 17
12 Warren County 15
13 Lowndes County 13
14 Pike County 13
15 Washington County 12
16 Panola County 11
17 Leflore County 10
18 Jones County 8
19 Lincoln County 8
20 Adams County 7
21 Pearl River County 7
22 Bolivar County 6
23 Grenada County 6
24 Clay County 5
25 Simpson County 5
26 Winston County 5
27 Oktibbeha County 5
28 Monroe County 4
29 Tippah County 4
... ... ...
34 Choctaw County 3
35 Lawrence County 2
36 Newton County 2
37 Copiah County 2
38 Humphreys County 2
39 Quitman County 2
40 Sunflower County 2
41 Jefferson County 2
42 George County 2
43 Jefferson Davis County 2
44 Tate County 2
45 Franklin County 2
46 Prentiss County 2
47 Yazoo County 2
48 Pontotoc County 1
49 Union County 1
50 Marshall County 1
51 Scott County 1
52 Attala County 1
53 Covington County 1
54 Perry County 1
55 Jasper County 1
56 Clarke County 1
57 Benton County 1
58 Holmes County 1
59 Amite County 1
60 Smith County 1
61 Stone County 1
62 Neshoba County 1
63 Chickasaw County 1

64 rows × 2 columns

Merge Provider Count and Population Dataframes

In [137]:
# Merge provider count and women data at county level for ND
county_mental_df = pd.merge(MS_pop_df,mental_MScounty_df,left_on='NAME', right_on='County',how='left')
In [139]:
county_mental_df.head()
Out[139]:
NAME OBJECTID SHAPE ST_ABBREV TOTPOP_CY County Provider_Count
0 Adams County 1402 {'rings': [[[-10195353.0856, 3667011.907600000... MS 31455 Adams County 7
1 Alcorn County 1403 {'rings': [[[-9838473.3692, 4163284.5766000003... MS 37398 Alcorn County 17
2 Amite County 1404 {'rings': [[[-10139507.6094, 3675190.789200000... MS 12573 Amite County 1
3 Attala County 1405 {'rings': [[[-9957952.5787, 3933319.5100999996... MS 19195 Attala County 1
4 Benton County 1406 {'rings': [[[-9917285.3423, 4109418.0692000017... MS 8621 Benton County 1
In [140]:
# Create new columns that shows Mental Healthcare provider by population
county_mental_df['people_per_prov'] = county_mental_df['TOTPOP_CY']/county_mental_df['Provider_Count']
In [142]:
# Arrange dataframe by mother_per_prov descending and then B13016_002E (women who gave birht) descending 
county_mental_df = county_mental_df.sort_values(by=['people_per_prov'], ascending=False)[['NAME','TOTPOP_CY','Provider_Count','people_per_prov']]
# county_obgyn_df.columns = ['Name','Provider_Count', "Total Women (15 to 50)","Women who had birth (past 12 months)", 'women_per_prov', 'mother_per_prov']
county_mental_df
Out[142]:
NAME TOTPOP_CY Provider_Count people_per_prov
46 Marshall County 37137 1 37137
57 Pontotoc County 32007 1 32007
49 Neshoba County 29483 1 29483
61 Scott County 29144 1 29144
72 Union County 28734 1 28734
15 Covington County 20192 1 20192
25 Holmes County 19589 1 19589
3 Attala County 19195 1 19195
65 Stone County 18248 1 18248
8 Chickasaw County 17554 1 17554
64 Smith County 17382 1 17382
30 Jasper County 17235 1 17235
11 Clarke County 16309 1 16309
14 Copiah County 29217 2 14608.5
68 Tate County 29215 2 14607.5
66 Sunflower County 28285 2 14142.5
81 Yazoo County 27697 2 13848.5
58 Prentiss County 25416 2 12708
2 Amite County 12573 1 12573
55 Perry County 12423 1 12423
22 Hancock County 49209 4 12302.2
19 George County 23952 2 11976
50 Newton County 21801 2 10900.5
52 Oktibbeha County 50893 5 10178.6
47 Monroe County 36744 4 9186
4 Benton County 8621 1 8621
33 Jones County 68332 8 8541.5
54 Pearl River County 56971 7 8138.71
38 Lawrence County 13464 2 6732
45 Marion County 25925 4 6481.25
... ... ... ... ...
9 Choctaw County 8385 3 2795
10 Claiborne County 9861 4 2465.25
44 Madison County 110172 48 2295.25
1 Alcorn County 37398 17 2199.88
40 Lee County 86039 45 1911.98
60 Rankin County 152523 81 1883
37 Lauderdale County 78920 52 1517.69
17 Forrest County 75838 51 1487.02
23 Harrison County 206287 143 1442.57
35 Lafayette County 56405 40 1410.12
24 Hinds County 241686 274 882.066
36 Lamar County 59391 76 781.461
6 Calhoun County 14741 NaN NaN
7 Carroll County 10761 NaN NaN
20 Greene County 13703 NaN NaN
27 Issaquena County 1403 NaN NaN
28 Itawamba County 23998 NaN NaN
34 Kemper County 11049 NaN NaN
39 Leake County 22284 NaN NaN
48 Montgomery County 10326 NaN NaN
51 Noxubee County 11253 NaN NaN
62 Sharkey County 4733 NaN NaN
67 Tallahatchie County 15196 NaN NaN
70 Tishomingo County 19971 NaN NaN
71 Tunica County 10696 NaN NaN
73 Walthall County 14910 NaN NaN
76 Wayne County 20937 NaN NaN
77 Webster County 10001 NaN NaN
78 Wilkinson County 9745 NaN NaN
80 Yalobusha County 12813 NaN NaN

82 rows × 4 columns

  • 18 counties in ND do not have any mental healthcare provider.
  • Among counties with providers, Marshall County seems to be the worst with 1 provider for 37137 people.

TO be Deleted?

Mental Health - MI

In [7]:
mental_map_mi = gis.map('USA')
mental_map_mi
In [20]:
# Add population density for Michigan
for layer in popdensity.layers:
#     if "43" in layer.url or "44" in layer.url:
    if layer.properties['id'] in [43,44,45,46,47,48,49]:
        mental_map_mi.add_layer(layer, {  "type": "FeatureLayer",
                                 "renderer":"ClassedColorRenderer",
#                                  "definition_expression" : "STATE_NAME='Utah' or STATE_NAME='Nevada' or STATE_NAME='Idaho' or STATE_NAME='Wyoming'",
                                 "definition_expression" : "STATE_NAME='Michigan'",
                                 "opacity":0.7,
                                 "field_name":"POPDENS_CY"})
In [21]:
# provider_layer = FeatureLayer("https://datascienceqa.esri.com/server/rest/services/Hosted/provider_clean_data_geocoded_6_19/FeatureServer")
mental_map_mi.add_layer(provider_data_layer,
                       {"type":"FeatureLayer",
                        "definition_expression":"Region='Michigan' and (user_taxonomy_code_1 in ['2084P0800X','207QG0300X','273R00000X','103T00000X','103TA0400X','103TA0700X','103TC0700X','103TC2200X','103TB0200X','103TC1900X','103TE1000X','103TE1100X','103TF0000X','103TF0200X','103TP2701X','103TH0004X','103TH0100X','103TM1700X','103TM1800X','103TP0016X','103TP0814X','103TP2700X','103TR0400X','103TS0200X','103TW0100X','106E00000X','106S00000X','2084A0401X','2084P0802X','2084B0002X','2084P0804X','2084N0600X','2084D0003X','2084F0202X','2084P0805X','2084H0002X','2084P0005X','2084N0400X','2084N0402X','2084N0008X','2084P2900X','2084P0015X','2084S0012X','2084S0010X','2084V0102X','364SP0808X','364SP0809X','364SP0807X','364SP0810X','364SP0811X','364SP0812X','364SP0813X','283Q00000X','261QM0801X'])",
#                         "definition_expression":"Region='Michigan'",
                        "opacity":0.7})
In [22]:
mental_map_mi.legend = True
In [19]:
mental_map_mi.remove_layers()
Out[19]:
True
In [23]:
mental_map_mi.take_screenshot()

Mental Map - 4 states

In [24]:
mid_states_map = gis.map('USA')
mid_states_map
In [44]:
# Add population density for mid states
for layer in popdensity.layers:
#     if "43" in layer.url or "44" in layer.url:
    if layer.properties['id'] in [43,44,45,46,47,48,49]:
        mid_states_map.add_layer(layer, {  "type": "FeatureLayer",
                                 "renderer":"ClassedColorRenderer",
                                 "definition_expression" : "STATE_NAME='Utah' or STATE_NAME='Nevada' or STATE_NAME='Idaho' or STATE_NAME='Wyoming' or STATE_NAME='Montana' or STATE_NAME='Colorado'",
#                                  "definition_expression" : "STATE_NAME='Michigan'",                                 
                                 "opacity":0.7,
                                 "field_name":"POPDENS_CY"})
In [45]:
mid_states_map.add_layer(provider_data_layer,
                       {"type":"FeatureLayer",
                        "definition_expression":"(Region in ['Utah','Wyoming','Nevada','Idaho','Montana','Colorado']) and (user_taxonomy_code_1 in ['2084P0800X','207QG0300X','273R00000X','103T00000X','103TA0400X','103TA0700X','103TC0700X','103TC2200X','103TB0200X','103TC1900X','103TE1000X','103TE1100X','103TF0000X','103TF0200X','103TP2701X','103TH0004X','103TH0100X','103TM1700X','103TM1800X','103TP0016X','103TP0814X','103TP2700X','103TR0400X','103TS0200X','103TW0100X','106E00000X','106S00000X','2084A0401X','2084P0802X','2084B0002X','2084P0804X','2084N0600X','2084D0003X','2084F0202X','2084P0805X','2084H0002X','2084P0005X','2084N0400X','2084N0402X','2084N0008X','2084P2900X','2084P0015X','2084S0012X','2084S0010X','2084V0102X','364SP0808X','364SP0809X','364SP0807X','364SP0810X','364SP0811X','364SP0812X','364SP0813X','283Q00000X','261QM0801X'])",
#                         "definition_expression":"Region='Michigan'",
                        "opacity":0.7})
In [47]:
mid_states_map.legend = True
In [43]:
mid_states_map.remove_layers()
Out[43]:
True
In [46]:
mid_states_map.take_screenshot()
In [ ]:
 
In [ ]:
 

Southern States

In [26]:
south_states_map = gis.map('USA')
# south_states_map.basemap = 'national-geographic'
south_states_map
In [27]:
# Add population density for mid states
for layer in popdensity.layers:
#     if "43" in layer.url or "44" in layer.url:
    if layer.properties['id'] in [43,44,45,46,47,48,49]:
        south_states_map.add_layer(layer, {  "type": "FeatureLayer",
                                 "renderer":"ClassedColorRenderer",
                                 "definition_expression" : "STATE_NAME='Arkansas' or STATE_NAME='Mississippi' or STATE_NAME='Louisiana' or STATE_NAME='Tennessee' or STATE_NAME='North Carolina' or STATE_NAME='South Carolina' or STATE_NAME='Alabama' or STATE_NAME='Georgia' or STATE_NAME='Florida'",
#                                  "definition_expression" : "STATE_NAME='Michigan'",                                 
                                 "opacity":0.5,
                                 "field_name":"POPDENS_CY"})
In [28]:
south_states_map.add_layer(provider_data_layer,
                       {"type":"FeatureLayer",
                        "definition_expression":"(Region in ['Arkansas','Mississippi','Louisiana','Tennessee','North Carolina','South Carolina','Alabama','Georgia','Florida']) and (user_taxonomy_code_1 in ['2084P0800X','207QG0300X','273R00000X','103T00000X','103TA0400X','103TA0700X','103TC0700X','103TC2200X','103TB0200X','103TC1900X','103TE1000X','103TE1100X','103TF0000X','103TF0200X','103TP2701X','103TH0004X','103TH0100X','103TM1700X','103TM1800X','103TP0016X','103TP0814X','103TP2700X','103TR0400X','103TS0200X','103TW0100X','106E00000X','106S00000X','2084A0401X','2084P0802X','2084B0002X','2084P0804X','2084N0600X','2084D0003X','2084F0202X','2084P0805X','2084H0002X','2084P0005X','2084N0400X','2084N0402X','2084N0008X','2084P2900X','2084P0015X','2084S0012X','2084S0010X','2084V0102X','364SP0808X','364SP0809X','364SP0807X','364SP0810X','364SP0811X','364SP0812X','364SP0813X','283Q00000X','261QM0801X'])",
#                         "definition_expression":"Region='Michigan'",
                        "opacity":0.7})
In [29]:
south_states_map.legend = True
In [31]:
south_states_map.remove_layers()
Out[31]:
True
In [30]:
south_states_map.take_screenshot()

Top States

In [8]:
top_states_map = gis.map('USA')
# south_states_map.basemap = 'national-geographic'
top_states_map
In [9]:
# Add population density for mid states
for layer in popdensity.layers:
#     if "43" in layer.url or "44" in layer.url:
    if layer.properties['id'] in [43,44,45,46,47,48,49]:
        top_states_map.add_layer(layer, {  "type": "FeatureLayer",
                                 "renderer":"ClassedColorRenderer",
                                 "definition_expression" : "STATE_NAME='Minnesota' or STATE_NAME='Iowa' or STATE_NAME='North Dakota' or STATE_NAME='South Dakota'",
#                                  "definition_expression" : "STATE_NAME='Michigan'",                                 
                                 "opacity":0.5,
                                 "field_name":"POPDENS_CY"})
In [10]:
top_states_map.add_layer(provider_data_layer,
                       {"type":"FeatureLayer",
                        "definition_expression":"(Region in ['Minnesota','Iowa','North Dakota','South Dakota']) and (user_taxonomy_code_1 in ['2084P0800X','207QG0300X','273R00000X','103T00000X','103TA0400X','103TA0700X','103TC0700X','103TC2200X','103TB0200X','103TC1900X','103TE1000X','103TE1100X','103TF0000X','103TF0200X','103TP2701X','103TH0004X','103TH0100X','103TM1700X','103TM1800X','103TP0016X','103TP0814X','103TP2700X','103TR0400X','103TS0200X','103TW0100X','106E00000X','106S00000X','2084A0401X','2084P0802X','2084B0002X','2084P0804X','2084N0600X','2084D0003X','2084F0202X','2084P0805X','2084H0002X','2084P0005X','2084N0400X','2084N0402X','2084N0008X','2084P2900X','2084P0015X','2084S0012X','2084S0010X','2084V0102X','364SP0808X','364SP0809X','364SP0807X','364SP0810X','364SP0811X','364SP0812X','364SP0813X','283Q00000X','261QM0801X'])",
#                         "definition_expression":"Region='Michigan'",
                        "opacity":0.7})
In [11]:
top_states_map.legend = True
In [25]:
top_states_map.remove_layers()
Out[25]:
True
In [12]:
top_states_map.take_screenshot()

Women's Health

Let's explore the distribution of OBGYN health providers in US using a heatmap.

Note - Provider Taxonomy codes were filtered for OB-GYN providers using this reference.

OBGYN Providers - Heat Map

In [8]:
women_map = gis.map('USA')
women_map

This map paints a grim picture of the availability of OBGYN healthcare providers. We can see vast areas in Midwest and West with NO or very few OBGYN providers.

In [15]:
# Define renderer and add provider data for OBGYN providers
renderer = {"renderer": "autocast", #This tells python to use JS autocasting
            "type": "heatmap",
            "blurRadius":1,  # changes the size of the clusters
            "maxPixelIntensity":2,
            "minPixelIntensity":0,
            "field":None}
renderer["colorStops"] = [{"ratio":0,"color":[63, 40, 102, 0]},
                          {"ratio":0.25,"color":[167,97,170,179]},
                          {"ratio":0.50,"color":"#7b3ce9"},
                          {"ratio":0.75,"color":[222,102,0,179]},
                          {"ratio":1,"color":[244,204,0,179]}]
women_map.add_layer(provider_data_layer,
               { "type": "FeatureLayer",
                 "renderer": renderer,
                "definition_expression" : "user_taxonomy_code_1 in ('207V00000X','207VC0200X','207VF0040X','207VX0201X','207VG0400X','207VH0002X','207VM0101X','207VB0002X','207VX0000X','207VE0102X','363LX0001X','163WR1000X','163WW0101X','282NW0100X')"
#                 "definition_expression" : "user_taxonomy_code_1 = '207VC0200X' or user_taxonomy_code_1 = '207V00000X'"
                })
In [14]:
# Remove Layer
women_map.remove_layers()
Out[14]:
True
In [22]:
# Take Screenshot
women_map.take_screenshot()

OB-GYN Providers and Fertility

Let's get data from the American Community Survey (ACS) about fertility in past 12 months by age of mother using ACS_Fertility_by_Age_Boundaries layer at State, County and Tract level. We will use 'Percent of women age 15 to 50 who had a birth in the past 12 months' as the variable to create our basemap and add providers as points on top.

In [16]:
# Get the Fertility Layers
fertility_search = gis.content.search('title: ACS_Fertility_by_Age_Boundaries', 'Feature Layer')
fertility_item = fertility_search[0]
fertility_item.layers
Out[16]:
[<FeatureLayer url:"https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Fertility_by_Age_Boundaries/FeatureServer/0">,
 <FeatureLayer url:"https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Fertility_by_Age_Boundaries/FeatureServer/1">,
 <FeatureLayer url:"https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Fertility_by_Age_Boundaries/FeatureServer/2">]
In [17]:
# Define layers for State, County and Tract (Percent of women 15 to 50 who had a birth in the past 12 months)
fertility_state = fertility_item.layers[0]
fertility_county = fertility_item.layers[1]
fertility_tract = fertility_item.layers[2]
In [28]:
fertility_map = gis.map('USA')
fertility_map

From this map, we can see that percent of women (15 to 50) who had a birth in the past 12 months is high in Idaho, Utah, North Dakota, South Dakota and Nebraska.

In [30]:
# Add Fertility layers for State, County and Tract (Percent of women 15 to 50 who had a birth in the past 12 months)
from arcgis.mapping import MapImageLayer
fertility_map.add_layer(fertility_state,
               { "type": "FeatureLayer",
                "field_name":"B13016_calc_pctBirthsE",
                "renderer":"ClassedColorRenderer",
                "opacity":0.5})

fertility_map.add_layer(fertility_county,
               { "type": "FeatureLayer",
                "renderer":"ClassedColorRenderer",
                "field_name":"B13016_calc_pctBirthsE",
                "opacity":0.5})

fertility_map.add_layer(fertility_tract,
               { "type": "FeatureLayer",
                "renderer":"ClassedColorRenderer",
                "field_name":"B13016_calc_pctBirthsE",
                "opacity":0.5})
In [31]:
# Add OB-GYN Provider Data
fertility_map.add_layer(provider_data_layer,
                       {"type":"FeatureLayer",
                        "definition_expression":"user_taxonomy_code_1 in ['207V00000X','207VC0200X','207VF0040X','207VX0201X','207VG0400X','207VH0002X','207VM0101X','207VB0002X','207VX0000X','207VE0102X','363LX0001X','163WR1000X','163WW0101X','282NW0100X']",
                        "opacity":0.7})
In [66]:
fertility_map.remove_layers()
Out[66]:
True
In [32]:
fertility_map.legend = True
In [33]:
fertility_map.take_screenshot()

Mothers to Providers Ratio by State

Let's find out the ratio of mothers to OBGYN providers to understand which states have the least number of OB-GYN providers

Dataframe for women population by State

We will use the fertility layer at state level to create this dataframe

In [18]:
# State population dataframe
fertility_featureset = fertility_state.query(where="B13016_001E>1")
fertility_df = fertility_featureset.sdf
fertility_df.head()
Out[18]:
ALAND AWATER B13016_001E B13016_001M B13016_002E B13016_002M B13016_003E B13016_003M B13016_004E B13016_004M B13016_005E B13016_005M B13016_006E B13016_006M B13016_007E B13016_007M B13016_008E B13016_008M B13016_009E B13016_009M B13016_010E B13016_010M B13016_011E B13016_011M B13016_012E B13016_012M B13016_013E B13016_013M B13016_014E B13016_014M B13016_015E B13016_015M B13016_016E B13016_016M B13016_017E B13016_017M B13016_calc_num15to19E B13016_calc_num15to19M B13016_calc_num20to24E B13016_calc_num20to24M B13016_calc_num25to29E B13016_calc_num25to29M B13016_calc_num30to34E B13016_calc_num30to34M B13016_calc_num35to39E B13016_calc_num35to39M B13016_calc_num40to44E B13016_calc_num40to44M B13016_calc_num45to50E B13016_calc_num45to50M B13016_calc_pct15to19E B13016_calc_pct15to19M B13016_calc_pct20to24E B13016_calc_pct20to24M B13016_calc_pct25to29E B13016_calc_pct25to29M B13016_calc_pct30to34E B13016_calc_pct30to34M B13016_calc_pct35to39E B13016_calc_pct35to39M B13016_calc_pct40to44E B13016_calc_pct40to44M B13016_calc_pct45to50E B13016_calc_pct45to50M B13016_calc_pctBirthsE B13016_calc_pctBirthsM GEOID NAME OBJECTID SHAPE STATENS STUSPS Shape__Area Shape__Length
0 131174431216 4592944701 1150523 1402 58732 1690 2903 415 14484 792 18605 889 13911 884 6318 680 1790 423 721 193 1091791 1867 157636 1096 152944 1175 144825 1120 141620 1125 147991 2099 152552 2185 194223 1366 160539 1172 167428 1417 163430 1430 155531 1431 154309 2206 154342 2226 194944 1380 1.8 0.258167 8.7 0.467339 11.4 0.534766 8.9 0.562386 4.1 0.436770 1.2 0.273556 0.4 0.098968 5.1 0.146698 01 Alabama 1 {"rings": [[[-9805779.6231, 3536997.5778], [-9... 01779775 AL 1.901226e+11 2.312416e+06
1 1478588231566 277723861311 174163 485 10582 662 408 125 2240 276 3190 359 2763 326 1483 270 430 99 68 40 163581 789 22202 326 22666 352 25803 411 23760 384 21123 710 21134 779 26893 421 22610 349 24906 447 28993 546 26523 504 22606 760 21564 785 26961 423 1.8 0.552151 9.0 1.096348 11.0 1.220770 10.4 1.213076 6.6 1.173833 2.0 0.453323 0.3 0.148310 6.1 0.379401 02 Alaska 2 {"rings": [[[-19937057.4487, 6661392.0514], [-... 01785533 AK 8.208934e+12 6.399688e+07
2 294198661567 1027245114 1571003 1527 85196 2315 3290 346 18209 982 24282 1113 22146 1110 12496 754 3273 324 1500 303 1485807 2427 222499 969 213748 1310 201156 1099 196251 1121 196215 2313 204729 2415 251209 1483 225789 1029 231957 1637 225438 1564 218397 1578 208711 2433 208002 2437 252709 1514 1.5 0.153096 7.9 0.419714 10.8 0.488018 10.1 0.502940 6.0 0.354459 1.6 0.154673 0.6 0.119848 5.4 0.147141 04 Arizona 3 {"rings": [[[-12138854.2127, 4438965.0002], [-... 01779777 AZ 4.340581e+11 2.906214e+06
3 134768100673 2963631791 689530 1063 40901 1606 2514 379 11224 869 12726 754 8852 676 4012 546 1088 240 485 148 648629 1983 95325 724 89233 1111 86020 996 86174 898 88668 1665 91183 1443 112026 960 97839 817 100457 1410 98746 1249 95026 1124 92680 1752 92271 1463 112511 971 2.6 0.386776 11.2 0.850713 12.9 0.745972 9.3 0.702799 4.3 0.583413 1.2 0.259431 0.4 0.131490 5.9 0.232502 05 Arkansas 4 {"rings": [[[-9989043.0946, 4300705.9503], [-9... 00068085 AR 2.053261e+11 2.656502e+06
4 403483182192 20484637928 9642845 3558 478458 5207 16079 831 76861 2027 120625 2303 138924 3037 87689 2301 28439 1168 9841 670 9164387 6546 1258668 1367 1302552 2268 1324982 2293 1245434 3141 1207288 5298 1256240 5262 1569223 3493 1274747 1600 1379413 3042 1445607 3250 1384358 4369 1294977 5776 1284679 5390 1579064 3557 1.3 0.065170 5.6 0.146432 8.3 0.158202 10.0 0.217082 6.8 0.175101 2.2 0.090442 0.6 0.042407 5.0 0.053932 06 California 5 {"rings": [[[-13198544.1255, 3897778.6019], [-... 01779778 CA 6.500881e+11 5.274852e+06

Dataframe for OB-GYN providers by state

We will use provider_data_layer to subset OB-GYN providers

In [19]:
# Get provider data for obgyn providers only

obgyn_featureset = provider_data_layer.query(where="user_taxonomy_code_1 in ('207V00000X','207VC0200X','207VF0040X','207VX0201X','207VG0400X','207VH0002X','207VM0101X','207VB0002X','207VX0000X','207VE0102X','363LX0001X','163WR1000X','163WW0101X','282NW0100X')", out_fields='user_npi,user_entity_type,user_provider_gender,user_taxonomy_code_1,user_full_address,postal,city,subregion,region,regionabbr')
obgyn_df = obgyn_featureset.sdf
obgyn_df.head()
Out[19]:
SHAPE city objectid postal region regionabbr subregion user_entity_type user_full_address user_npi user_provider_gender user_taxonomy_code_1
0 {"x": -97.49116252599998, "y": 35.261905469000... Norman 8 73072 Oklahoma OK Cleveland County Individual 3400 W TECUMSEH RD, SUITE 205, NORMAN, OK 7307... 1.487658e+09 F 207V00000X
1 {"x": -120.00990533799995, "y": 46.31641132900... Sunnyside 24 98944 Washington WA Yakima County Individual 803 E LINCOLN AVE, , SUNNYSIDE, WA 989442383 1.265435e+09 F 207V00000X
2 {"x": -81.63739261199999, "y": 38.359802984000... Charleston 26 25302 West Virginia WV Kanawha County Individual 830 PENNSYLVANIA AVE, SUITE 108, CHARLESTON, W... 1.447253e+09 M 207V00000X
3 {"x": -81.63739261199999, "y": 38.359802984000... Charleston 99 25302 West Virginia WV Kanawha County Individual 830 PENNSYLVANIA AVE, STE 402, CHARLESTON, WV ... 1.487658e+09 M 207V00000X
4 {"x": -81.63739261199999, "y": 38.359802984000... Charleston 172 25302 West Virginia WV Kanawha County Individual 830 PENNSYLVANIA AVE, STE 402, CHARLESTON, WV ... 1.255334e+09 M 207V00000X
In [21]:
# Create dataframe of obgyn provider counts by state
obgyn_count_df = pd.DataFrame(obgyn_df['regionabbr'].value_counts().reset_index().values, columns=['regionabbr','Provider_Count'])
In [22]:
# Plot OB-GYN Providers by State

plt.figure(figsize=(25,12))
sns.barplot(obgyn_count_df['regionabbr'].iloc[:-8], obgyn_count_df['Provider_Count'].iloc[:-8])
plt.title('OB-GYN Providers by State', fontsize=22)
plt.xlabel('States', fontsize=18)
plt.ylabel('Provider Count', fontsize=18)
Out[22]:
Text(0, 0.5, 'Provider Count')

Merge Provider Count and Population Dataframes

In [23]:
# Merge provider count and women_df at state level
state_obgyn_df = pd.merge(obgyn_count_df,fertility_df,left_on='regionabbr', right_on='STUSPS',how='inner')
In [24]:
# Create new columns that shows provider by women pop
state_obgyn_df['women_per_prov'] = state_obgyn_df['B13016_001E']/state_obgyn_df['Provider_Count']
# Create new columns that shows provider by mother pop
state_obgyn_df['mother_per_prov'] = state_obgyn_df['B13016_002E']/state_obgyn_df['Provider_Count']
In [25]:
# Arrange dataframe by mother_per_prov descending
state_obgyn_df = state_obgyn_df.sort_values(by=['mother_per_prov'], ascending=False)
state_obgyn_df
Out[25]:
regionabbr Provider_Count ALAND AWATER B13016_001E B13016_001M B13016_002E B13016_002M B13016_003E B13016_003M B13016_004E B13016_004M B13016_005E B13016_005M B13016_006E B13016_006M B13016_007E B13016_007M B13016_008E B13016_008M B13016_009E B13016_009M B13016_010E B13016_010M B13016_011E B13016_011M B13016_012E B13016_012M B13016_013E B13016_013M B13016_014E B13016_014M B13016_015E B13016_015M B13016_016E B13016_016M B13016_017E B13016_017M B13016_calc_num15to19E B13016_calc_num15to19M B13016_calc_num20to24E B13016_calc_num20to24M B13016_calc_num25to29E B13016_calc_num25to29M B13016_calc_num30to34E B13016_calc_num30to34M B13016_calc_num35to39E B13016_calc_num35to39M B13016_calc_num40to44E B13016_calc_num40to44M B13016_calc_num45to50E B13016_calc_num45to50M B13016_calc_pct15to19E B13016_calc_pct15to19M B13016_calc_pct20to24E B13016_calc_pct20to24M B13016_calc_pct25to29E B13016_calc_pct25to29M B13016_calc_pct30to34E B13016_calc_pct30to34M B13016_calc_pct35to39E B13016_calc_pct35to39M B13016_calc_pct40to44E B13016_calc_pct40to44M B13016_calc_pct45to50E B13016_calc_pct45to50M B13016_calc_pctBirthsE B13016_calc_pctBirthsM GEOID NAME OBJECTID SHAPE STATENS STUSPS Shape__Area Shape__Length women_per_prov mother_per_prov
51 ND 102 178710423375 4400396641 168792 563 11410 783 517 161 2609 459 3726 398 2880 363 1411 359 211 79 56 39 157382 957 22304 415 28639 582 22947 498 21004 401 19288 789 18822 685 24378 456 22821 445 31248 741 26673 638 23884 541 20699 867 19033 690 24434 458 2.3 0.704106 8.3 1.455489 14.0 1.454254 12.1 1.495102 6.8 1.710719 1.1 0.413118 0.2 0.159556 6.8 0.462823 38 North Dakota 35 {'rings': [[[-10823452.8858, 6274958.149], [-1... 01779797 ND 4.003510e+11 3.123593e+06 1654.82 111.863
32 UT 526 212884846341 7000199770 744748 957 52639 1428 1263 256 10387 710 16697 866 15192 712 7502 531 1267 267 331 133 692109 1759 112478 509 112858 819 92431 832 94332 748 98897 1460 87738 1541 93375 840 113741 570 123245 1084 109128 1201 109524 1033 106399 1554 89005 1564 93706 850 1.1 0.225004 8.4 0.571299 15.3 0.775493 13.9 0.636786 7.1 0.488325 1.4 0.298938 0.4 0.141897 7.1 0.191263 49 Utah 45 {'rings': [[[-12139394.6091, 5012444.5138], [-... 01455989 UT 3.682861e+11 2.557183e+06 1415.87 100.074
35 AR 440 134768100673 2963631791 689530 1063 40901 1606 2514 379 11224 869 12726 754 8852 676 4012 546 1088 240 485 148 648629 1983 95325 724 89233 1111 86020 996 86174 898 88668 1665 91183 1443 112026 960 97839 817 100457 1410 98746 1249 95026 1124 92680 1752 92271 1463 112511 971 2.6 0.386776 11.2 0.850713 12.9 0.745972 9.3 0.702799 4.3 0.583413 1.2 0.259431 0.4 0.131490 5.9 0.232502 05 Arkansas 4 {'rings': [[[-9989043.0946, 4300705.9503], [-9... 00068085 AR 2.053261e+11 2.656502e+06 1567.11 92.9568
49 SD 137 196345228871 3384471850 186754 651 12697 717 518 138 2940 319 3849 413 3346 358 1581 259 326 121 137 75 174057 958 26460 431 26086 538 23172 488 23773 446 23415 710 22287 652 28864 519 26978 453 29026 625 27021 639 27119 572 24996 756 22613 663 29001 524 1.9 0.510511 10.1 1.077157 14.2 1.490858 12.3 1.294202 6.3 1.018354 1.4 0.533418 0.5 0.258471 6.8 0.383039 46 South Dakota 42 {'rings': [[[-10749419.778, 5769979.5139], [-1... 01785534 SD 3.919820e+11 2.962929e+06 1363.17 92.6788
43 ID 250 214048160737 2393355752 376343 997 22877 960 810 230 5132 512 7280 635 6059 590 2698 402 614 197 284 118 353466 1221 56534 619 48332 641 45833 703 47302 723 49003 1372 48670 1344 57792 862 57344 660 53464 820 53113 947 53361 933 51701 1430 49284 1358 58076 870 1.4 0.400759 9.6 0.946269 13.7 1.170320 11.4 1.087706 5.2 0.764034 1.2 0.398247 0.5 0.203050 6.1 0.254615 16 Idaho 13 {'rings': [[[-12918526.7316, 6275006.0277], [-... 01779783 ID 4.246748e+11 4.197354e+06 1505.37 91.508
34 IA 480 144664158135 1081293682 701974 1000 41743 1604 1689 243 8619 825 12653 687 11690 657 5427 509 1084 202 581 153 660231 1735 102593 513 102818 1014 81504 832 85354 784 87584 1311 87550 1343 112828 900 104282 568 111437 1307 94157 1079 97044 1023 93011 1406 88634 1358 113409 913 1.6 0.232855 7.7 0.734750 13.4 0.713196 12.0 0.664997 5.8 0.540092 1.2 0.227132 0.5 0.134847 5.9 0.228094 19 Iowa 16 {'rings': [[[-10154309.3595, 5388474.8922], [-... 01779785 IA 2.648094e+11 2.527131e+06 1462.45 86.9646
38 NE 336 198957965731 1370523694 432593 701 27898 932 730 171 5463 461 8225 523 8611 542 3585 354 814 147 470 140 404695 1042 62040 499 61378 681 52108 580 54877 587 54908 1025 53435 1002 65949 606 62770 527 66841 822 60333 781 63488 799 58493 1084 54249 1013 66419 622 1.2 0.272248 8.2 0.682333 13.6 0.848703 13.6 0.836466 6.1 0.594447 1.5 0.269520 0.7 0.210679 6.4 0.214997 31 Nebraska 28 {'rings': [[[-10736262.9814, 5234760.2573], [-... 01779792 NE 3.578638e+11 2.922099e+06 1287.48 83.0298
33 KS 486 211753159949 1346325556 662453 1061 39414 1429 1687 279 8906 730 10899 674 11480 653 4970 483 1053 181 419 116 623039 1549 95455 743 93872 976 81579 911 83346 770 82588 1355 82948 1302 103251 848 97142 794 102778 1219 92478 1133 94826 1010 87558 1439 84001 1315 103670 856 1.7 0.286857 8.7 0.702794 11.8 0.714376 12.1 0.676449 5.7 0.543689 1.3 0.214578 0.4 0.111844 5.9 0.215331 20 Kansas 17 {'rings': [[[-10609671.1704, 4865943.0191], [-... 00481813 KS 3.484442e+11 2.570743e+06 1363.07 81.0988
28 OK 668 177664450004 3373087228 904535 884 53590 1422 2937 286 14103 760 15571 816 12508 702 6145 454 1550 222 776 154 850945 1533 122870 616 122845 799 117785 877 119076 803 111910 1381 117202 1377 139257 887 125807 679 136948 1103 133356 1198 131584 1067 118055 1454 118752 1395 140033 900 2.3 0.226983 10.3 0.548722 11.7 0.602838 9.5 0.527902 5.2 0.379185 1.3 0.186314 0.6 0.109916 5.9 0.156932 40 Oklahoma 37 {'rings': [[[-10532824.3805, 4438955.0818], [-... 01102857 OK 2.744190e+11 3.307886e+06 1354.09 80.2246
24 MN 932 206229176104 18944967530 1268872 1143 73295 1732 2101 293 11193 595 19565 807 25081 941 11248 605 3000 324 1107 210 1195577 1943 172421 645 167175 694 159438 903 164182 998 159460 2115 160590 2161 212311 1075 174522 708 178368 914 179003 1211 189263 1372 170708 2200 163590 2185 213418 1095 1.2 0.167816 6.3 0.332027 10.9 0.444725 13.3 0.487823 6.6 0.344083 1.8 0.196536 0.5 0.098362 5.8 0.136271 27 Minnesota 24 {'rings': [[[-10243096.0782, 5894294.6155], [-... 00662849 MN 4.587742e+11 4.504564e+06 1361.45 78.6427
1 TX 5161 676641930188 19017521093 6800021 2997 397530 5500 21768 1195 86594 2398 109234 2557 104129 2933 54463 1770 16076 926 5266 497 6402491 6428 930609 1869 872706 2713 878353 2601 878663 3357 876401 5195 907688 5045 1058071 2829 952377 2218 959300 3621 987587 3647 982792 4458 930864 5488 923764 5129 1063337 2872 2.3 0.125363 9.0 0.247641 11.1 0.255672 10.6 0.294540 5.9 0.186991 1.7 0.099775 0.5 0.046721 5.8 0.080744 48 Texas 44 {'rings': [[[-10867517.6923, 2998334.6597], [-... 01779801 TX 9.487726e+11 8.498835e+06 1317.58 77.0258
23 WI 934 140275464079 29359527964 1312355 1160 67517 1511 1782 296 12926 751 18740 762 21201 784 9297 582 2589 320 982 188 1244838 1825 185801 643 185287 805 155085 871 161462 863 163691 1828 166713 1668 226799 1102 187583 708 198213 1101 173825 1157 182663 1166 172988 1918 169302 1698 227781 1118 0.9 0.157756 6.5 0.377150 10.8 0.432459 11.6 0.422763 5.4 0.331121 1.5 0.188388 0.4 0.082508 5.1 0.114984 55 Wisconsin 50 {'rings': [[[-9739359.7332, 5630191.737], [-97... 01779806 WI 2.874128e+11 3.531267e+06 1405.09 72.288
30 MS 530 121530256608 3930182746 714792 1225 37818 1534 2383 361 10517 674 11817 764 7666 635 3786 422 1000 222 649 206 676974 2173 102332 1294 95368 1337 88387 878 89783 809 91519 1561 93499 1668 116086 1046 104715 1343 105885 1497 100204 1164 97449 1028 95305 1617 94499 1683 116735 1066 2.3 0.343508 9.9 0.620857 11.8 0.750037 7.9 0.646317 4.0 0.437629 1.1 0.234166 0.6 0.176395 5.3 0.214307 28 Mississippi 25 {'rings': [[[-9847958.7008, 3529611.841], [-98... 01779790 MS 1.752353e+11 3.003227e+06 1348.66 71.3547
26 AL 831 131174431216 4592944701 1150523 1402 58732 1690 2903 415 14484 792 18605 889 13911 884 6318 680 1790 423 721 193 1091791 1867 157636 1096 152944 1175 144825 1120 141620 1125 147991 2099 152552 2185 194223 1366 160539 1172 167428 1417 163430 1430 155531 1431 154309 2206 154342 2226 194944 1380 1.8 0.258167 8.7 0.467339 11.4 0.534766 8.9 0.562386 4.1 0.436770 1.2 0.273556 0.4 0.098968 5.1 0.146698 01 Alabama 1 {'rings': [[[-9805779.6231, 3536997.5778], [-9... 01779775 AL 1.901226e+11 2.312416e+06 1384.5 70.6763
14 WA 1304 172111800165 12560067439 1700267 1488 92040 2034 2729 392 15476 1058 25580 1155 28015 975 15442 943 3270 360 1528 268 1608227 2552 211659 736 216767 1102 230636 1166 226631 980 221964 2666 221665 2536 278905 1447 214388 834 232243 1528 256216 1641 254646 1382 237406 2828 224935 2561 280433 1472 1.3 0.182779 6.7 0.453443 10.0 0.446233 11.0 0.378200 6.5 0.389580 1.5 0.159188 0.5 0.095524 5.4 0.119453 53 Washington 48 {'rings': [[[-13651702.4638, 5966299.4185], [-... 01779804 WA 3.831213e+11 5.712577e+06 1303.89 70.5828
47 AK 155 1478588231566 277723861311 174163 485 10582 662 408 125 2240 276 3190 359 2763 326 1483 270 430 99 68 40 163581 789 22202 326 22666 352 25803 411 23760 384 21123 710 21134 779 26893 421 22610 349 24906 447 28993 546 26523 504 22606 760 21564 785 26961 423 1.8 0.552151 9.0 1.096348 11.0 1.220770 10.4 1.213076 6.6 1.173833 2.0 0.453323 0.3 0.148310 6.1 0.379401 02 Alaska 2 {'rings': [[[-19937057.4487, 6661392.0514], [-... 01785533 AK 8.208934e+12 6.399688e+07 1123.63 68.271
18 IN 1226 92787765193 1539541677 1552714 1801 83517 2136 3805 417 19285 1076 23972 1055 22734 1091 9433 681 3196 366 1092 204 1469197 2803 220438 998 215755 1343 189329 1208 187767 1234 197144 2121 201249 2184 257515 1595 224243 1082 235040 1721 213301 1604 210501 1647 206577 2228 204445 2214 258607 1608 1.7 0.185779 8.2 0.453835 11.2 0.487332 10.8 0.511352 4.6 0.325960 1.6 0.178219 0.4 0.078840 5.4 0.137366 18 Indiana 15 {'rings': [[[-9440558.1637, 5115568.7167], [-9... 00448508 IN 1.595776e+11 2.230325e+06 1266.49 68.1215
16 AZ 1257 294198661567 1027245114 1571003 1527 85196 2315 3290 346 18209 982 24282 1113 22146 1110 12496 754 3273 324 1500 303 1485807 2427 222499 969 213748 1310 201156 1099 196251 1121 196215 2313 204729 2415 251209 1483 225789 1029 231957 1637 225438 1564 218397 1578 208711 2433 208002 2437 252709 1514 1.5 0.153096 7.9 0.419714 10.8 0.488018 10.1 0.502940 6.0 0.354459 1.6 0.154673 0.6 0.119848 5.4 0.147141 04 Arizona 3 {'rings': [[[-12138854.2127, 4438965.0002], [-... 01779777 AZ 4.340581e+11 2.906214e+06 1249.8 67.7772
31 NV 530 284329327067 2047350803 688113 933 35640 1268 1283 226 6223 592 10631 732 9530 608 5524 525 1890 307 559 152 652473 1553 84103 463 84252 577 93345 773 91894 702 89600 1600 94203 1543 115076 842 85386 515 90475 827 103976 1065 101424 929 95124 1684 96093 1573 115635 856 1.5 0.264525 6.9 0.651297 10.2 0.696176 9.4 0.593253 5.8 0.542252 2.0 0.317856 0.5 0.131399 5.2 0.184025 32 Nevada 29 {'rings': [[[-12695040.5225, 5160062.591], [-1... 01779793 NV 4.802969e+11 3.056062e+06 1298.33 67.2453
50 WY 110 251465641446 1860628076 129212 681 7365 602 375 126 1544 305 2356 304 2043 304 671 159 182 91 194 128 121847 800 17167 389 17492 455 16875 469 17498 370 17010 743 16377 706 19428 396 17542 409 19036 548 19231 559 19541 479 17681 760 16559 712 19622 416 2.1 0.716545 8.1 1.585122 12.3 1.540148 10.5 1.534449 3.8 0.884351 1.1 0.547514 1.0 0.651992 5.7 0.465144 56 Wyoming 51 {'rings': [[[-11583671.286, 5621145.5785], [-1... 01779807 WY 4.741976e+11 2.777154e+06 1174.65 66.9545
25 KY 838 102266092821 2388731561 1030561 1405 55402 1750 3028 399 13166 857 16961 1022 13590 776 6097 564 1600 249 960 204 975159 2193 138223 959 135326 1058 126513 1129 126042 899 132526 2176 138214 2165 178315 1333 141251 1039 148492 1362 143474 1523 139632 1188 138623 2248 139814 2179 179275 1349 2.1 0.282035 8.9 0.571377 11.8 0.701184 9.7 0.549543 4.4 0.400558 1.1 0.177198 0.5 0.113720 5.4 0.169565 21 Kentucky 18 {'rings': [[[-9961457.8678, 4369322.1272], [-9... 01779786 KY 1.667122e+11 2.753667e+06 1229.79 66.1122
17 TN 1247 106798015774 2354836197 1568704 1693 80791 1690 4526 524 20304 905 23108 1028 20814 977 8840 612 2353 352 846 179 1487913 2450 201325 1026 205419 1273 203950 1157 195684 1206 202771 2291 210101 2246 268663 1487 205851 1152 225723 1562 227058 1548 216498 1552 211611 2371 212454 2273 269509 1498 2.2 0.254255 9.0 0.396073 10.2 0.447400 9.6 0.445981 4.2 0.285397 1.1 0.165259 0.3 0.066394 5.2 0.107589 47 Tennessee 43 {'rings': [[[-9314702.8266, 4383607.3303], [-9... 01325873 TN 1.664791e+11 2.621414e+06 1257.98 64.7883
36 NM 410 314191415563 733669653 473337 885 26525 1011 1668 320 6652 660 7358 493 6006 493 3241 368 1069 264 531 147 446812 1265 66249 597 65036 722 60420 529 61432 543 57947 1392 60040 1326 75688 914 67917 677 71688 978 67778 723 67438 733 61188 1440 61109 1352 76219 926 2.5 0.470527 9.3 0.911912 10.9 0.718097 8.9 0.724605 5.3 0.588365 1.7 0.430278 0.7 0.192679 5.6 0.213254 35 New Mexico 32 {'rings': [[[-11466167.8568, 4439128.5521], [-... 00897535 NM 4.644013e+11 2.900272e+06 1154.48 64.6951
22 LA 950 111904803121 23746413153 1118915 1237 60549 1822 3272 477 14926 787 18139 1093 15227 1015 6641 592 1463 224 881 239 1058366 2319 143686 845 152617 1005 153462 1154 149438 1227 140645 1983 140142 2076 178376 1105 146958 970 167543 1276 171601 1589 164665 1592 147286 2069 141605 2088 179257 1131 2.2 0.324250 8.9 0.464804 10.6 0.629377 9.2 0.609885 4.5 0.396917 1.0 0.157451 0.5 0.133292 5.4 0.162598 22 Louisiana 19 {'rings': [[[-10120798.2502, 3381965.1428], [-... 01629543 LA 1.675793e+11 4.198750e+06 1177.81 63.7358
39 WV 310 62265662566 489840834 402606 842 19682 946 962 193 5270 530 6147 516 4683 490 1758 262 474 136 388 133 382924 1448 52229 589 54109 734 47390 658 48286 560 52550 1252 56801 1174 71559 710 53191 620 59379 905 53537 836 52969 744 54308 1279 57275 1182 71947 722 1.8 0.362230 8.9 0.882262 11.5 0.946996 8.8 0.916697 3.2 0.476372 0.8 0.236836 0.5 0.184779 4.9 0.234688 54 West Virginia 49 {'rings': [[[-8847301.8894, 4825493.6305], [-8... 01779805 WV 1.030460e+11 2.614073e+06 1298.73 63.4903
0 CA 7543 403483182192 20484637928 9642845 3558 478458 5207 16079 831 76861 2027 120625 2303 138924 3037 87689 2301 28439 1168 9841 670 9164387 6546 1258668 1367 1302552 2268 1324982 2293 1245434 3141 1207288 5298 1256240 5262 1569223 3493 1274747 1600 1379413 3042 1445607 3250 1384358 4369 1294977 5776 1284679 5390 1579064 3557 1.3 0.065170 5.6 0.146432 8.3 0.158202 10.0 0.217082 6.8 0.175101 2.2 0.090442 0.6 0.042407 5.0 0.053932 06 California 5 {'rings': [[[-13198544.1255, 3897778.6019], [-... 01779778 CA 6.500881e+11 5.274852e+06 1278.38 63.4307
45 ME 226 79885808421 11748168571 289915 724 14100 799 336 101 2505 379 3953 437 4730 494 1795 266 566 163 215 83 275815 1171 39289 411 35635 529 34673 431 33882 553 35424 773 40593 827 56319 669 39625 423 38140 651 38626 614 38612 742 37219 817 41159 843 56534 674 0.8 0.254729 6.6 0.987364 10.2 1.119605 12.3 1.257551 4.8 0.706804 1.4 0.395022 0.4 0.146744 4.9 0.275272 23 Maine 20 {'rings': [[[-7859306.2593, 5309094.2568], [-7... 01779787 ME 1.723955e+11 3.775975e+06 1282.81 62.3894
7 OH 2303 105833282399 10264451012 2667220 1781 141773 2541 6130 524 30094 1354 42334 1574 38506 1191 18285 966 4320 414 2104 282 2525447 2850 371578 986 355390 1582 334827 1619 322728 1436 327887 2534 352679 2623 460358 1495 377708 1117 385484 2082 377161 2258 361234 1866 346172 2712 356999 2655 462462 1521 1.6 0.138648 7.8 0.348707 11.2 0.411883 10.7 0.325073 5.3 0.275967 1.2 0.115617 0.5 0.060960 5.3 0.095133 39 Ohio 36 {'rings': [[[-9206145.5154, 5103064.4505], [-9... 01085497 OH 1.842500e+11 2.145534e+06 1158.15 61.5601
9 GA 2221 149177524294 4733385577 2555460 2228 136101 2966 6976 689 29979 1407 37397 1708 34265 1749 19692 1085 5484 537 2308 359 2419359 3653 342872 1735 321174 1978 319620 1873 318105 2028 332176 4063 351277 3863 434135 2063 349848 1867 351153 2427 357017 2535 352370 2678 351868 4205 356761 3900 436443 2094 2.0 0.196655 8.5 0.396312 10.5 0.472592 9.7 0.490821 5.6 0.301014 1.5 0.149580 0.5 0.082217 5.3 0.115900 13 Georgia 11 {'rings': [[[-9251608.9138, 4163971.617], [-92... 01705317 GA 2.159941e+11 2.582918e+06 1150.59 61.2792
11 VA 1752 102254240128 8532012665 2030818 1520 105067 2534 3410 426 17561 983 27855 1074 31174 1228 17769 907 5313 488 1985 313 1925751 3050 265171 1434 264803 1720 261294 1297 255919 1537 257606 2676 270990 2501 349968 1427 268581 1496 282364 1981 289149 1684 287093 1967 275375 2826 276303 2548 351953 1461 1.3 0.158454 6.2 0.345387 9.6 0.367173 10.9 0.421216 6.5 0.322644 1.9 0.175725 0.6 0.088902 5.2 0.124610 51 Virginia 47 {'rings': [[[-8458295.369, 4552089.1276], [-84... 01779803 VA 1.673934e+11 3.720225e+06 1159.14 59.9697
20 SC 1036 77862731483 5071381300 1148289 1334 61725 1553 2488 355 14262 843 18116 777 15574 923 7993 718 2375 329 917 217 1086564 2135 154271 955 150761 1107 148504 927 140833 1038 144940 1977 150681 2119 196574 1223 156759 1019 165023 1391 166620 1210 156407 1389 152933 2103 153056 2144 197491 1242 1.6 0.226227 8.6 0.505617 10.9 0.459598 10.0 0.583464 5.2 0.463953 1.6 0.213852 0.5 0.109840 5.4 0.135049 45 South Carolina 41 {'rings': [[[-8743152.9102, 4008829.0132], [-8... 01779799 SC 1.174042e+11 1.913047e+06 1108.39 59.5801
46 MT 204 376960880222 3871059371 222821 664 12139 662 446 128 2584 368 3740 390 3240 385 1548 221 436 125 145 68 210682 1068 30452 541 32190 552 27591 537 28702 523 29153 756 26963 792 35631 515 30898 556 34774 663 31331 664 31942 649 30701 788 27399 802 35776 519 1.4 0.413451 7.4 1.048736 11.9 1.218795 10.1 1.187559 5.0 0.708117 1.6 0.453837 0.4 0.189981 5.4 0.296658 30 Montana 27 {'rings': [[[-11582648.3446, 6274793.6263], [-... 00767982 MT 8.201726e+11 4.615725e+06 1092.26 59.5049
15 MO 1302 178052037005 2488190402 1407252 1622 76296 1712 3489 389 16646 972 23356 861 20049 911 8871 645 2828 361 1057 261 1330956 2415 190626 918 191885 1286 179620 1021 179655 1020 176549 2090 178696 2054 233925 1282 194115 997 208531 1612 202976 1336 199704 1368 185420 2187 181524 2085 234982 1308 1.8 0.200184 8.0 0.462015 11.5 0.417372 10.0 0.450962 4.8 0.343251 1.6 0.198065 0.4 0.111044 5.4 0.121477 29 Missouri 26 {'rings': [[[-10176764.2505, 4921064.8725], [-... 01779791 MO 2.943633e+11 3.050106e+06 1080.84 58.5991
19 CO 1219 268425964573 1178495763 1314134 1296 69064 1764 2404 332 12043 820 17412 919 21424 1119 11618 808 3189 355 974 206 1245070 2249 166276 836 166510 986 181129 1036 177232 1246 173695 2203 169594 1954 210634 1163 168680 900 178553 1282 198541 1385 198656 1675 185313 2347 172783 1986 211608 1181 1.4 0.196675 6.7 0.456687 8.8 0.458816 10.8 0.555897 6.3 0.428728 1.8 0.204362 0.5 0.097316 5.3 0.134047 08 Colorado 6 {'rings': [[[-11583155.812, 5012550.0328], [-1... 01779779 CO 4.473109e+11 2.708282e+06 1078.04 56.6563
27 OR 829 248604328809 6195045325 938000 1156 46891 1423 1699 316 8315 710 13570 701 13080 764 6930 560 2496 369 801 240 891109 1807 117922 763 120981 968 123026 871 126495 855 128059 1931 123396 1959 151230 1153 119621 826 129296 1200 136596 1118 139575 1147 134989 2011 125892 1993 152031 1178 1.4 0.263986 6.4 0.545874 9.9 0.506710 9.4 0.541931 5.1 0.407738 2.0 0.291423 0.5 0.157810 5.0 0.151516 41 Oregon 38 {'rings': [[[-13739902.4519, 5817179.7538], [-... 01155107 OR 4.851724e+11 3.245438e+06 1131.48 56.5633
10 NC 2192 125919712692 13470113896 2418330 2156 121971 2930 5235 508 25688 1407 35174 1474 31407 1317 16816 958 5491 572 2160 397 2296359 3841 319881 1312 312107 1528 304942 1555 296291 1484 306747 3124 336614 3168 419777 2197 325116 1407 337795 2077 340116 2143 327698 1984 323563 3268 342105 3219 421937 2233 1.6 0.156096 7.6 0.413892 10.3 0.428455 9.6 0.397683 5.2 0.291388 1.6 0.166517 0.5 0.094051 5.0 0.121004 37 North Carolina 34 {'rings': [[[-8404865.2607, 4207455.9158], [-8... 01027616 NC 1.958019e+11 4.403645e+06 1103.25 55.6437
37 HI 358 16634117742 11777681513 321374 647 19748 968 520 152 3061 386 5958 525 5351 462 3364 407 1019 212 475 139 301626 1224 37171 191 40913 397 43264 528 43662 490 40864 945 41945 915 53807 691 37691 244 43974 554 49222 745 49013 673 44228 1029 42964 939 54282 705 1.4 0.403180 7.0 0.873400 12.1 1.050744 10.9 0.930610 7.6 0.903056 2.4 0.490706 0.9 0.255818 6.1 0.300637 15 Hawaii 12 {'rings': [[[-17321095.4151, 2287790.5412], [-... 01779782 HI 1.909508e+10 1.616132e+06 897.693 55.162
5 IL 2917 143784114293 6211277447 3091828 1949 156704 2888 5474 474 26960 1227 39116 1577 48078 1371 26498 1004 8103 604 2475 308 2935124 3924 412694 870 409396 1285 402723 1548 393800 1493 394748 2875 403151 2957 518612 1857 418168 991 436356 1777 441839 2210 441878 2027 421246 3045 411254 3018 521087 1882 1.3 0.113309 6.2 0.280064 8.9 0.354160 10.9 0.306226 6.3 0.233963 2.0 0.146154 0.5 0.059082 5.1 0.093287 17 Illinois 14 {'rings': [[[-9773905.0437, 5234955.0855], [-9... 01779784 IL 2.496541e+11 2.747059e+06 1059.93 53.7209
42 NH 286 23187445452 1028643155 301067 670 15210 832 371 128 2319 360 3922 424 5066 439 2536 350 690 176 306 118 285857 1081 42986 354 41316 566 34004 474 33273 475 35445 1015 40155 1045 58678 634 43357 376 43635 671 37926 636 38339 647 37981 1074 40845 1060 58984 645 0.9 0.295130 5.3 0.820968 10.3 1.104435 13.2 1.123125 6.7 0.901964 1.7 0.428661 0.5 0.199974 5.1 0.275998 33 New Hampshire 30 {'rings': [[[-7860509.7182, 5307853.9016], [-7... 01779794 NH 4.599331e+10 1.325759e+06 1052.68 53.1818
3 FL 4170 138911437206 31398800291 4568521 3282 220509 4001 7831 683 40098 1713 62132 1887 59055 1976 35502 1738 11662 912 4229 457 4348012 4727 571732 1277 592706 1972 595319 2008 570329 2166 576543 4501 619527 4380 821856 3083 579563 1448 632804 2612 657451 2756 629384 2932 612045 4825 631189 4474 826085 3117 1.4 0.117799 6.3 0.269433 9.5 0.284270 9.4 0.310900 5.8 0.280260 1.8 0.143894 0.5 0.055287 4.8 0.087476 12 Florida 10 {'rings': [[[-9139900.2618, 2825608.9535], [-9... 00294478 FL 1.961979e+11 4.679537e+06 1095.57 52.8799
29 PR 582 8868734851 4922543816 839230 1137 29668 1232 3046 414 8396 674 7864 687 5391 497 3136 448 1181 313 654 197 809562 1782 115056 569 114751 714 105926 702 104069 513 112201 1891 113799 1829 143760 1054 118102 704 123147 982 113790 982 109460 714 115337 1943 114980 1856 144414 1072 2.6 0.350207 6.8 0.544606 6.9 0.600791 4.9 0.452909 2.7 0.385717 1.0 0.271716 0.5 0.136372 3.5 0.146709 72 Puerto Rico 52 {'rings': [[[-7404454.6019, 2024993.4011], [-7... 01779808 PR 9.987440e+09 7.641856e+05 1441.98 50.9759
13 MD 1526 25150696145 6980371026 1461505 1286 74140 1749 2626 388 10628 778 18673 921 22167 1156 14005 719 4697 430 1344 229 1387365 2022 187665 662 182947 1041 190061 959 186703 1158 185019 2183 191122 2148 263848 1281 190291 767 193575 1300 208734 1330 208870 1636 199024 2298 195819 2191 265192 1301 1.4 0.203822 5.5 0.400216 8.9 0.437534 10.6 0.547176 7.0 0.352008 2.4 0.217944 0.5 0.086317 5.1 0.119517 24 Maryland 21 {'rings': [[[-8486633.6279, 4563782.6974], [-8... 01714934 MD 4.490638e+10 3.051474e+06 957.736 48.5845
6 MI 2553 146488062160 103998746281 2284424 1456 120630 2366 4897 459 25228 1075 33718 1245 34445 1101 16210 790 4350 407 1782 274 2163794 2684 324623 800 328378 1250 275070 1257 261282 1223 274742 2389 297925 2392 401774 1477 329520 922 353606 1649 308788 1769 295727 1646 290952 2516 302275 2426 403556 1502 1.5 0.139231 7.1 0.302185 10.9 0.398307 11.6 0.366615 5.6 0.267214 1.4 0.134149 0.4 0.067877 5.3 0.103426 26 Michigan 23 {'rings': [[[-9330373.0182, 5414017.1419], [-9... 01779789 MI 2.963523e+11 6.631921e+06 894.8 47.2503
2 NY 5054 122048992746 19247151848 4867199 2378 228874 3785 6271 461 32318 1215 56547 1762 68770 2022 46074 1522 13786 799 5108 513 4638325 4460 610357 1084 665489 1475 693439 1804 629101 2030 591145 4543 614633 4202 834161 2274 616628 1178 697807 1911 749986 2522 697871 2865 637219 4791 628419 4277 839269 2331 1.0 0.074736 4.6 0.173654 7.5 0.233566 9.9 0.286900 7.2 0.232581 2.2 0.126265 0.6 0.061101 4.7 0.077679 36 New York 33 {'rings': [[[-8265089.4336, 4941893.0483], [-8... 01779796 NY 2.373534e+11 3.682011e+06 963.039 45.2857
12 MA 1692 20204287539 7130763257 1668943 1288 76567 2150 1512 336 8448 706 17081 1018 25869 1095 16947 1007 5468 460 1242 210 1592376 2362 226808 630 235632 897 227986 1104 204024 1114 191367 2226 212670 2362 293889 1343 228320 714 244080 1142 245067 1502 229893 1562 208314 2443 218138 2406 295131 1359 0.7 0.147147 3.5 0.288796 7.0 0.413194 11.3 0.470132 8.1 0.473896 2.5 0.209055 0.4 0.071128 4.6 0.128688 25 Massachusetts 22 {'rings': [[[-7881849.2341, 5049370.5517], [-7... 00606926 MA 3.892670e+10 1.986538e+06 986.373 45.2524
8 NJ 2241 19049723313 3542963551 2118945 1766 100779 2275 1967 334 12695 940 21809 1094 33848 1193 21584 1001 6945 588 1931 296 2018166 2842 277098 458 267988 938 257929 1141 255618 1210 269480 2904 291613 2912 398440 1603 279065 567 280683 1328 279738 1581 289466 1699 291064 3072 298558 2971 400371 1630 0.7 0.119677 4.5 0.334213 7.8 0.388590 11.7 0.406383 7.4 0.334886 2.3 0.195582 0.5 0.073905 4.8 0.107243 34 New Jersey 31 {'rings': [[[-8242603.8795, 4966516.5938], [-8... 01779795 NJ 3.458525e+10 1.108955e+06 945.535 44.9705
4 PA 3283 115881477379 3397554419 2916477 2053 147285 2754 5872 551 25415 1141 41506 1231 44084 1663 21960 1040 6063 528 2385 300 2769192 3297 402215 1008 396626 1338 377163 1394 350845 1662 345545 3062 379587 3090 517211 1850 408087 1149 422041 1758 418669 1860 394929 2351 367505 3234 385650 3135 519596 1874 1.4 0.134959 6.0 0.269187 9.9 0.290710 11.2 0.415812 6.0 0.278061 1.6 0.136314 0.5 0.057713 5.1 0.094309 42 Pennsylvania 39 {'rings': [[[-8314999.9816, 5065206.5215], [-8... 01779798 PA 2.054706e+11 2.099403e+06 888.357 44.8629
44 DE 247 5047241079 1398670234 219096 542 10598 810 271 101 1780 348 3467 417 2783 415 1758 258 452 150 87 50 208498 1024 29386 166 29250 393 29204 414 27262 414 27342 925 27127 941 38927 523 29657 194 31030 525 32671 588 30045 586 29100 960 27579 953 39014 525 0.9 0.340508 5.7 1.117288 10.6 1.261991 9.3 1.369396 6.0 0.863907 1.6 0.540936 0.2 0.128124 4.8 0.369268 10 Delaware 8 {'rings': [[[-8409364.6405, 4793054.363], [-84... 01779781 DE 8.697981e+09 6.108627e+05 887.028 42.9069
48 VT 141 23873457570 1031134839 140834 420 6042 526 170 104 1034 217 1695 254 1701 210 929 161 369 126 144 63 134792 640 21061 251 21190 292 15775 287 16527 294 17180 557 17373 548 25686 343 21231 272 22224 364 17470 383 18228 361 18109 580 17742 562 25830 349 0.8 0.489742 4.7 0.973444 9.7 1.438277 9.3 1.137153 5.1 0.873746 2.1 0.707117 0.6 0.243786 4.3 0.373145 50 Vermont 46 {'rings': [[[-7959464.1401, 5623625.6427], [-7... 01779802 VT 4.827226e+10 1.281178e+06 998.823 42.8511
41 RI 291 2677997539 1323452846 254311 659 11841 796 474 177 1898 378 2721 370 4027 415 2031 333 519 169 171 91 242470 1046 36493 299 38155 456 33280 431 29329 441 29291 758 31202 775 44720 658 36967 347 40053 592 36001 568 33356 606 31322 828 31721 793 44891 664 1.3 0.478654 4.7 0.941147 7.6 1.020808 12.1 1.224668 6.5 1.049241 1.6 0.531198 0.4 0.202635 4.7 0.312663 44 Rhode Island 40 {'rings': [[[-7965127.0492, 5034747.1014], [-7... 01219835 RI 5.138826e+09 6.848588e+05 873.921 40.6907
21 CT 962 12542619303 1815495323 840156 946 36794 1315 1164 251 4373 468 8258 502 12843 798 6987 541 2259 345 910 205 803362 1651 120875 453 113653 612 98992 561 97378 814 99266 1609 112580 1639 160618 892 122039 518 118026 770 107250 753 110221 1140 106253 1698 114839 1675 161528 915 1.0 0.205632 3.7 0.395785 7.7 0.464933 11.7 0.713899 6.6 0.498200 2.0 0.299047 0.6 0.126873 4.4 0.156368 09 Connecticut 7 {'rings': [[[-8169262.7439, 5021086.1714], [-8... 01779780 CT 2.314619e+10 7.820726e+05 873.343 38.2474
40 DC 307 158351639 18675956 203284 406 9567 728 328 149 1339 255 1610 332 3142 403 2452 295 585 163 111 76 193717 772 19216 241 28081 340 42657 308 35885 417 24635 785 20408 766 22835 415 19544 283 29420 425 44267 453 39027 580 27087 839 20993 783 22946 422 1.7 0.761995 4.6 0.864260 3.6 0.749070 8.1 1.025663 9.1 1.052371 2.8 0.769461 0.5 0.331093 4.7 0.357723 11 District of Columbia 9 {'rings': [[[-8575943.174, 4691871.4072], [-85... 01702382 DC 2.927454e+08 8.630067e+04 662.163 31.1629
In [26]:
# Plot No. of Mothers (age 15 to 50) per OB-GYN Provider by State

plt.figure(figsize=(25,12))
sns.barplot(state_obgyn_df['regionabbr'], state_obgyn_df['mother_per_prov'])
plt.title('No. of Mothers (age 15 to 50) per OB-GYN Provider by State', fontsize=22)
plt.xlabel('States', fontsize=18)
plt.ylabel('No. of Mothers (age 15 to 50)', fontsize=18)
plt.xticks(fontsize=15)
plt.yticks(fontsize=15)
Out[26]:
(array([  0.,  20.,  40.,  60.,  80., 100., 120.]),
 <a list of 7 Text yticklabel objects>)

On average, there were ~112 mothers and 1655 women per provider in ND compared to ~31 mothers and 662 women per provider in DC. The difference is drastic.

Exploring North Dakota

North Dakota has the highest number of mothers and women per OB-GYN provider. From the fertility map above, we also saw that percent of women (15 to 50) who had a birth in the past 12 months is high in North Dakota.

Let's explore North Dakota to find out which counties have the lowest number of OBGYN providers.

Dataframe for women population in North Dakota

In [27]:
# State population df
ND_featureset = fertility_county.query(where="STATE='North Dakota'")
ND_fertility_df = ND_featureset.sdf
ND_fertility_df.head()
Out[27]:
ALAND AWATER B13016_001E B13016_001M B13016_002E B13016_002M B13016_003E B13016_003M B13016_004E B13016_004M B13016_005E B13016_005M B13016_006E B13016_006M B13016_007E B13016_007M B13016_008E B13016_008M B13016_009E B13016_009M B13016_010E B13016_010M B13016_011E B13016_011M B13016_012E B13016_012M B13016_013E B13016_013M B13016_014E B13016_014M B13016_015E B13016_015M B13016_016E B13016_016M B13016_017E B13016_017M B13016_calc_num15to19E B13016_calc_num15to19M B13016_calc_num20to24E B13016_calc_num20to24M B13016_calc_num25to29E B13016_calc_num25to29M B13016_calc_num30to34E B13016_calc_num30to34M B13016_calc_num35to39E B13016_calc_num35to39M B13016_calc_num40to44E B13016_calc_num40to44M B13016_calc_num45to50E B13016_calc_num45to50M B13016_calc_pct15to19E B13016_calc_pct15to19M B13016_calc_pct20to24E B13016_calc_pct20to24M B13016_calc_pct25to29E B13016_calc_pct25to29M B13016_calc_pct30to34E B13016_calc_pct30to34M B13016_calc_pct35to39E B13016_calc_pct35to39M B13016_calc_pct40to44E B13016_calc_pct40to44M B13016_calc_pct45to50E B13016_calc_pct45to50M B13016_calc_pctBirthsE B13016_calc_pctBirthsM COUNTYNS GEOID NAME OBJECTID SHAPE Shape__Area Shape__Length State
0 2557960600 2833854 446 58 19 20 12 17 0 9 0 9 0 9 7 11 0 9 0 9 427 65 37 24 67 29 53 24 56 21 48 23 103 37 63 31 49 29 67 30 53 26 56 23 55 25 103 38 63 32 24.5 31.521266 0.0 13.432836 0.0 16.981132 0.0 16.071429 12.7 19.145034 0.0 8.737864 0.0 14.285714 4.3 4.480234 01034210 38001 Adams County 1991 {"rings": [[[-11354354.1023, 5813340.1041], [-... 5.324157e+09 330639.744151 North Dakota
1 3863107435 56591279 2234 110 173 73 0 15 5 10 124 63 18 22 26 35 0 15 0 15 2061 127 391 64 317 79 216 70 267 62 238 73 274 53 358 48 391 66 322 80 340 94 285 66 264 81 274 55 358 50 0.0 3.836317 1.6 3.081535 36.5 15.545781 6.3 7.579469 9.8 12.908628 0.0 5.474453 0.0 4.189944 7.7 3.257869 01034225 38003 Barnes County 1992 {"rings": [[[-10904992.8409, 5981421.7966], [-... 8.403601e+09 374027.679170 North Dakota
2 3596568808 131708144 1390 16 128 33 8 9 68 24 20 13 18 11 7 6 7 7 0 13 1262 37 202 21 181 25 178 13 166 12 155 24 140 25 240 16 210 23 249 35 198 18 184 16 162 25 147 26 240 21 3.8 4.265356 27.3 8.841183 10.1 6.501124 9.8 5.917430 4.3 3.643182 4.8 4.686829 0.0 5.416667 9.2 2.364013 01034216 38005 Benson County 1993 {"rings": [[[-11075502.1995, 6168791.7355], [-... 8.343651e+09 537806.413896 North Dakota
3 2975481852 11990484 174 36 5 5 0 9 0 9 3 4 0 9 2 3 0 9 0 9 169 35 20 19 12 11 10 10 33 15 32 13 14 11 48 16 20 21 12 14 13 11 33 17 34 13 14 14 48 18 0.0 45.000000 0.0 75.000000 23.1 23.779327 0.0 27.272727 5.9 8.532061 0.0 64.285714 0.0 18.750000 2.9 2.872377 01035616 38007 Billings County 1994 {"rings": [[[-11476951.3137, 5995895.8254], [-... 6.425825e+09 369444.155012 North Dakota
4 4321196493 74864998 1204 49 68 43 0 13 11 14 16 14 24 29 17 21 0 13 0 13 1136 67 163 37 159 43 117 15 141 27 175 49 132 37 249 42 163 39 170 45 133 21 165 40 192 53 132 39 249 44 0.0 7.975460 6.5 8.055208 12.0 10.353515 14.5 17.218402 8.9 10.660919 0.0 9.848485 0.0 5.220884 5.6 3.565728 01034227 38009 Bottineau County 1995 {"rings": [[[-11152289.0833, 6274727.6819], [-... 1.011984e+10 483713.596470 North Dakota

Dataframe for OB-GYN providers in North Dakota by County

In [28]:
# Get provider data for obgyn providers only

obgyn_ND_featureset = provider_data_layer.query(where="Region='North Dakota' AND (user_taxonomy_code_1 in ('207V00000X','207VC0200X','207VF0040X','207VX0201X','207VG0400X','207VH0002X','207VM0101X','207VB0002X','207VX0000X','207VE0102X','363LX0001X'))") 
#                           out_fields='user_npi,user_entity_type,user_provider_gender,user_taxonomy_code_1,user_full_address,Postal,City,Subregion,Region,RegionAbbr')
obgyn_ND_df = obgyn_ND_featureset.sdf
obgyn_ND_df.head()
Out[28]:
SHAPE addnumfrom addnumto addr_type addressnumber addressrange bldgname bldgtype block buildingname city country displayx displayy distance district extrainfo in_address in_address2 in_city in_postal in_region langcode levelname leveltype loc_name longlabel match_addr metroarea neighborhood objectid phone place_addr placename postal postalext rank region regionabbr score sector shortlabel side staddr status stdir stname stpredir stpretype sttype subaddress subregion territory type unitname unittype url user_address user_address2 user_city user_country user_entity_type user_full_address user_npi user_organization_name user_postal user_provider_gender user_region user_taxonomy_code_1 user_taxonomy_code_10 user_taxonomy_code_11 user_taxonomy_code_12 user_taxonomy_code_13 user_taxonomy_code_14 user_taxonomy_code_15 user_taxonomy_code_2 user_taxonomy_code_3 user_taxonomy_code_4 user_taxonomy_code_5 user_taxonomy_code_6 user_taxonomy_code_7 user_taxonomy_code_8 user_taxonomy_code_9 user_taxonomy_group_1 x x_max x_min y y_max y_min zone
0 {"x": -96.78767519099995, "y": 46.884720309000... 801 825 StreetAddress 801 801-825 Fargo USA -96.787675 46.884720 0.0 801 BROADWAY N None FARGO 58122.0 ND ENG World 801 Broadway N, Fargo, ND, 58102, USA 801 Broadway N, Fargo, North Dakota, 58102 Downtown Fargo 3720 801 Broadway N, Fargo, North Dakota, 58102 58102 20.0 North Dakota ND 99.51 801 Broadway N R 801 Broadway N M N Broadway Cass County 801 BROADWAY N None FARGO US Individual 801 BROADWAY N, , FARGO, ND 58122 1.851398e+09 None 58122.0 M ND 207VM0101X None None None None None None 207VM0101X None None None None None None None None -96.787675 -96.786675 -96.788675 46.884720 46.885720 46.883720
1 {"x": -97.06651079899996, "y": 47.912072701000... 1098 1000 StreetAddress 1000 1000-1098 Grand Forks USA -97.066511 47.912073 0.0 582066002 1000 SOUTH COLUMBIA ROAD None GRAND FORKS 582066002.0 ND ENG World 1000 S Columbia Rd, Grand Forks, ND, 58201, USA 1000 S Columbia Rd, Grand Forks, North Dakota,... 12480 1000 S Columbia Rd, Grand Forks, North Dakota,... 58201 20.0 North Dakota ND 97.86 1000 S Columbia Rd L 1000 S Columbia Rd M Columbia S Rd Grand Forks County 1000 SOUTH COLUMBIA ROAD None GRAND FORKS US Individual 1000 SOUTH COLUMBIA ROAD, , GRAND FORKS, ND 58... 1.366440e+09 None 582066002.0 M ND 207V00000X None None None None None None None None None None None None None None None -97.066511 -97.065511 -97.067511 47.912073 47.913073 47.911073
2 {"x": -99.74991768599995, "y": 48.838085857000... 1 1099 StreetAddress 1 1-1099 Belcourt USA -99.749918 48.838086 0.0 1 HOSPITAL ROAD NORTH None BELCOURT 58316.0 ND ENG World 1 Hospital Rd, Belcourt, ND, 58316, USA 1 Hospital Rd, Belcourt, North Dakota, 58316 45476 1 Hospital Rd, Belcourt, North Dakota, 58316 58316 20.0 North Dakota ND 98.87 1 Hospital Rd L 1 Hospital Rd M Hospital Rd Rolette County 1 HOSPITAL ROAD NORTH None BELCOURT US Individual 1 HOSPITAL ROAD NORTH, , BELCOURT, ND 58316 1.164496e+09 None 58316.0 M ND 207V00000X None None None None None None 207V00000X None None None None None None None None -99.749918 -99.748918 -99.750918 48.838086 48.839086 48.837086
3 {"x": -100.77651963899996, "y": 46.80847046400... PointAddress 1000 Bismarck USA -100.776510 46.808793 0.0 1000 E ROSSER AVE None BISMARCK 585014414.0 ND ENG World 1000 E Rosser Ave, Bismarck, ND, 58501, USA 1000 E Rosser Ave, Bismarck, North Dakota, 58501 Downtown Bismarck 60149 1000 E Rosser Ave, Bismarck, North Dakota, 58501 58501 20.0 North Dakota ND 100.00 1000 E Rosser Ave R 1000 E Rosser Ave M Rosser E Ave Burleigh County 1000 E ROSSER AVE None BISMARCK US Individual 1000 E ROSSER AVE, , BISMARCK, ND 585014414 1.982658e+09 None 585014414.0 M ND 207V00000X None None None None None None None None None None None None None None None -100.776520 -100.775510 -100.777510 46.808470 46.809793 46.807793
4 {"x": -100.77651963899996, "y": 46.80847046400... PointAddress 1000 Bismarck USA -100.776510 46.808793 0.0 1000 E ROSSER AVE None BISMARCK 585014414.0 ND ENG World 1000 E Rosser Ave, Bismarck, ND, 58501, USA 1000 E Rosser Ave, Bismarck, North Dakota, 58501 Downtown Bismarck 60879 1000 E Rosser Ave, Bismarck, North Dakota, 58501 58501 20.0 North Dakota ND 100.00 1000 E Rosser Ave R 1000 E Rosser Ave M Rosser E Ave Burleigh County 1000 E ROSSER AVE None BISMARCK US Individual 1000 E ROSSER AVE, , BISMARCK, ND 585014414 1.093769e+09 None 585014414.0 M ND 207V00000X None None None None None None None None None None None None None None None -100.776520 -100.775510 -100.777510 46.808470 46.809793 46.807793
In [29]:
# Create dataframe of obgyn provider counts by county
obgyn_NDcounty_df = pd.DataFrame(obgyn_ND_df['subregion'].value_counts().reset_index().values, columns=['County','Provider_Count'])
obgyn_NDcounty_df.head()
Out[29]:
County Provider_Count
0 Cass County 36
1 Burleigh County 22
2 Grand Forks County 13
3 Ward County 10
4 Williams County 8

Merge Provider Count and Population Dataframes

In [30]:
# Merge provider count and women data at county level for ND
county_obgyn_df = pd.merge(ND_fertility_df,obgyn_NDcounty_df,left_on='NAME', right_on='County',how='left')
In [31]:
# Create new columns that shows provider by women pop
county_obgyn_df['women_per_prov'] = county_obgyn_df['B13016_001E']/county_obgyn_df['Provider_Count']
# Create new columns that shows provider by mother pop
county_obgyn_df['mother_per_prov'] = county_obgyn_df['B13016_002E']/county_obgyn_df['Provider_Count']
In [32]:
# Arrange dataframe by mother_per_prov descending and then B13016_002E (women who gave birht) descending 
county_obgyn_df = county_obgyn_df.sort_values(by=['mother_per_prov','B13016_002E'], ascending=False)[['NAME','Provider_Count','B13016_001E','B13016_002E','women_per_prov','mother_per_prov']]
county_obgyn_df.columns = ['Name','Provider_Count', "Total Women (15 to 50)","Women who had birth (past 12 months)", 'women_per_prov', 'mother_per_prov']
county_obgyn_df
Out[32]:
Name Provider_Count Total Women (15 to 50) Women who had birth (past 12 months) women_per_prov mother_per_prov
38 Richland County 1 3459 231 3459 231
46 Stutsman County 2 4275 303 2137.5 151.5
44 Stark County 5 6850 592 1370 118.4
50 Ward County 10 16362 1141 1636.2 114.1
52 Williams County 8 7258 779 907.25 97.375
8 Cass County 36 44821 2936 1245.03 81.5556
42 Sioux County 1 1056 75 1056 75
17 Grand Forks County 13 17889 895 1376.08 68.8462
39 Rolette County 3 3262 171 1087.33 57
7 Burleigh County 22 20934 1213 951.545 55.1364
29 Morton County NaN 6575 463 NaN NaN
1 Barnes County NaN 2234 173 NaN NaN
26 McKenzie County NaN 2528 150 NaN NaN
10 Dickey County NaN 1026 149 NaN NaN
24 McHenry County NaN 1128 137 NaN NaN
33 Pembina County NaN 1206 129 NaN NaN
2 Benson County NaN 1390 128 NaN NaN
49 Walsh County NaN 1982 120 NaN NaN
35 Ramsey County NaN 2372 117 NaN NaN
30 Mountrail County NaN 2078 113 NaN NaN
27 McLean County NaN 1654 109 NaN NaN
28 Mercer County NaN 1612 98 NaN NaN
5 Bowman County NaN 660 90 NaN NaN
51 Wells County NaN 612 84 NaN NaN
34 Pierce County NaN 773 76 NaN NaN
4 Bottineau County NaN 1204 68 NaN NaN
11 Divide County NaN 396 65 NaN NaN
20 Hettinger County NaN 533 64 NaN NaN
12 Dunn County NaN 828 60 NaN NaN
13 Eddy County NaN 420 57 NaN NaN
48 Traill County NaN 1637 57 NaN NaN
15 Foster County NaN 631 53 NaN NaN
36 Ransom County NaN 1057 52 NaN NaN
19 Griggs County NaN 391 50 NaN NaN
9 Cavalier County NaN 597 35 NaN NaN
47 Towner County NaN 341 35 NaN NaN
16 Golden Valley County NaN 368 34 NaN NaN
37 Renville County NaN 517 34 NaN NaN
40 Sargent County NaN 735 32 NaN NaN
32 Oliver County NaN 306 31 NaN NaN
21 Kidder County NaN 426 30 NaN NaN
31 Nelson County NaN 461 28 NaN NaN
14 Emmons County NaN 570 26 NaN NaN
6 Burke County NaN 403 22 NaN NaN
22 LaMoure County NaN 691 20 NaN NaN
0 Adams County NaN 446 19 NaN NaN
23 Logan County NaN 275 15 NaN NaN
18 Grant County NaN 390 14 NaN NaN
41 Sheridan County NaN 224 14 NaN NaN
45 Steele County NaN 293 10 NaN NaN
25 McIntosh County NaN 407 7 NaN NaN
3 Billings County NaN 174 5 NaN NaN
43 Slope County NaN 75 1 NaN NaN
  • 43 out of 53 counties in ND do not have any Obgyn healthcare providers.
  • Morton County seems to be the worst with 463 women who gave birth but no provider.

Summarize Data - GA Tools

In [100]:
# Create provider count df
from arcgis.geoanalytics import summarize_data
fertility_state = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Fertility_by_Age_Boundaries/FeatureServer/0")
sum_fields = ['user_npi Count']
eq_summary = summarize_data.aggregate_points(point_layer = provider_data_layer.filter("OBJECTID < 10"),
                                            polygon_layer = fertility_state,
                                             output_name='test_women_agg')
#                                             group_by_field = 'STUSPS',
#                                             summary_fields=sum_fields)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-100-ad333b42341e> in <module>
      3 fertility_state = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Fertility_by_Age_Boundaries/FeatureServer/0")
      4 sum_fields = ['user_npi Count']
----> 5 eq_summary = summarize_data.aggregate_points(point_layer = provider_data_layer.filter("OBJECTID < 10"),
      6                                             polygon_layer = fertility_state,
      7                                              output_name='test_women_agg')

TypeError: 'NoneType' object is not callable
In [11]:
# Create provider count df
from arcgis.features import summarize_data
fertility_state = FeatureLayer("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ACS_Fertility_by_Age_Boundaries/FeatureServer/0")
sum_fields = ['user_npi Count']
eq_summary = summarize_data.aggregate_points(point_layer = provider_data_layer,
                                            polygon_layer = fertility_state,
                                            keep_boundaries_with_no_points=False,
                                            group_by_field = 'STUSPS',
                                            summary_fields = sum_fields)
GetLayers for parameter 0 failed. Error: {"code" : 0, "messageCode":"GPEXT_018","message": "Number of features in service https://datascienceqa.esri.com/server/rest/services/Hosted/provider_clean_data_geocoded_6_19/FeatureServer/0 exceeds the limit of 100,000 features. Use a hosted feature service as input to analyze large dataset.","params":{"url" : "https://datascienceqa.esri.com/server/rest/services/Hosted/provider_clean_data_geocoded_6_19/FeatureServer/0"}}
{"messageCode": "AO_100001", "message": "AggregatePoints failed."}
Failed to execute (AggregatePoints).
Failed.
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-11-860b6902dbc3> in <module>
      7                                             keep_boundaries_with_no_points=False,
      8                                             group_by_field = 'STUSPS',
----> 9                                             summary_fields=sum_fields)

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\features\summarize_data.py in aggregate_points(point_layer, polygon_layer, keep_boundaries_with_no_points, summary_fields, group_by_field, minority_majority, percent_points, output_name, context, gis, estimate)
     95                      output_name,
     96                      context,
---> 97                      estimate=estimate)
     98 
     99 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\_impl\tools.py in aggregate_points(self, point_layer, polygon_layer, keep_boundaries_with_no_points, summary_fields, group_by_field, minority_majority, percent_points, output_name, context, estimate)
    504         task_url, job_info, job_id = super()._analysis_job(task, params)
    505 
--> 506         job_info = super()._analysis_job_status(task_url, job_info)
    507         job_values = super()._analysis_job_results(task_url, job_info, job_id)
    508         #print(job_values)

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\_impl\tools.py in _analysis_job_status(self, task_url, job_info)
    187 
    188                     if job_response.get("jobStatus") == "esriJobFailed":
--> 189                         raise Exception("Job failed.")
    190                     elif job_response.get("jobStatus") == "esriJobCancelled":
    191                         raise Exception("Job cancelled.")

Exception: Job failed.
In [9]:
import arcpy

# Set local variables
# This example used a big data file share name "Crimes" with dataset "Chicago" registered on my GeoAnalytics server
inFeatures = "https://MyGeoAnalyticsMachine.domain.com/geoanalytics/rest/services/DataStoreCatalogs/bigDataFileShares_Crimes/BigDataCatalogServer/Chicago"
summaryFields = "Region"
# summaryStatistics = [["user_npi", "COUNT"]]
outFS = 'SummarizeStates'


# Execute SummarizeAttributes
arcpy.geoanalytics.SummarizeAttributes(provider_data_layer, outFS, summaryFields)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-9-85d7a01ac9d5> in <module>
     10 
     11 # Execute SummarizeAttributes
---> 12 arcpy.geoanalytics.SummarizeAttributes(provider_data_layer, outFS, summaryFields)

~\AppData\Local\Programs\ArcGIS\Pro\Resources\ArcPy\arcpy\geoanalytics.py in SummarizeAttributes(input_layer, output_name, fields, summary_fields, data_store)
   1732         return retval
   1733     except Exception as e:
-> 1734         raise e
   1735 
   1736 @gptooldoc('SummarizeWithin_geoanalytics', None)

~\AppData\Local\Programs\ArcGIS\Pro\Resources\ArcPy\arcpy\geoanalytics.py in SummarizeAttributes(input_layer, output_name, fields, summary_fields, data_store)
   1729     from arcpy.arcobjects.arcobjectconversion import convertArcObjectToPythonObject
   1730     try:
-> 1731         retval = convertArcObjectToPythonObject(gp.SummarizeAttributes_geoanalytics(*gp_fixargs((input_layer, output_name, fields, summary_fields, data_store), True)))
   1732         return retval
   1733     except Exception as e:

~\AppData\Local\Programs\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py in <lambda>(*args)
    504         val = getattr(self._gp, attr)
    505         if callable(val):
--> 506             return lambda *args: val(*gp_fixargs(args, True))
    507         else:
    508             return convertArcObjectToPythonObject(val)

RuntimeError: Object: Error in executing tool

Clustering

The idea of clustering is to find out if observations in the data naturally group together in some predictable way. In our case, we want to know if there is natural grouping that distinguishes some states from others. Standardization - most cluster analysis algorithms depend on the concept of measuring the distance between the different observations we're trying to cluster. If one of the variables is measured on a much larger scale than the other variables, then whatever measure we use will be overly influenced by the variable that has larger scale. So, we standardize our data to bring all variables to the same scale.

OB-GYN Providers and County Data

Create dataframe for OBGYN Providers by County

In [35]:
# Get provider data for obgyn providers only
obgyn_df.head()
Out[35]:
SHAPE city objectid postal region regionabbr subregion user_entity_type user_full_address user_npi user_provider_gender user_taxonomy_code_1
0 {"x": -97.49116252599998, "y": 35.261905469000... Norman 8 73072 Oklahoma OK Cleveland County Individual 3400 W TECUMSEH RD, SUITE 205, NORMAN, OK 7307... 1.487658e+09 F 207V00000X
1 {"x": -120.00990533799995, "y": 46.31641132900... Sunnyside 24 98944 Washington WA Yakima County Individual 803 E LINCOLN AVE, , SUNNYSIDE, WA 989442383 1.265435e+09 F 207V00000X
2 {"x": -81.63739261199999, "y": 38.359802984000... Charleston 26 25302 West Virginia WV Kanawha County Individual 830 PENNSYLVANIA AVE, SUITE 108, CHARLESTON, W... 1.447253e+09 M 207V00000X
3 {"x": -81.63739261199999, "y": 38.359802984000... Charleston 99 25302 West Virginia WV Kanawha County Individual 830 PENNSYLVANIA AVE, STE 402, CHARLESTON, WV ... 1.487658e+09 M 207V00000X
4 {"x": -81.63739261199999, "y": 38.359802984000... Charleston 172 25302 West Virginia WV Kanawha County Individual 830 PENNSYLVANIA AVE, STE 402, CHARLESTON, WV ... 1.255334e+09 M 207V00000X
In [307]:
obgyn_df.shape
Out[307]:
(66754, 12)
In [36]:
obgyn_county_df = obgyn_df[['regionabbr','subregion']]
obgyn_county_df['Provider_Count'] = obgyn_county_df.groupby(['regionabbr','subregion'])['subregion'].transform('count')
obgyn_count_df = obgyn_county_df.drop_duplicates(subset='subregion', keep="first", inplace=True)
obgyn_county_df.shape
C:\Users\mohi9282\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\ipykernel_launcher.py:2: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  
C:\Users\mohi9282\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\ipykernel_launcher.py:3: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  This is separate from the ipykernel package so we can avoid doing imports until
Out[36]:
(1282, 3)
In [37]:
obgyn_county_df = obgyn_county_df.sort_values(by=['Provider_Count'], ascending=False)
obgyn_county_df.head()
Out[37]:
regionabbr subregion Provider_Count
100 CA Los Angeles County 2094
37 IL Cook County 1586
1167 NY New York County 1136
9 TX Harris County 1124
134 AZ Maricopa County 844
In [38]:
# Check missing
obgyn_county_df.isnull().sum()
Out[38]:
regionabbr        0
subregion         0
Provider_Count    0
dtype: int64

Create dataframe for County Data

In [41]:
county_layer = popdensity.layers[46]
county_df = pd.DataFrame()
offset = 0
while offset <= 3000:
    county_featureset_test = county_layer.query(return_all_records=False,
                                           result_offset=offset,
                                           result_record_count=750)
    county_df_test = county_featureset_test.sdf
    county_df = pd.concat([county_df_test, county_df], ignore_index=True)
    offset += 750
In [42]:
county_df.shape
Out[42]:
(3142, 1943)
In [43]:
# Removing columns for 2023,2010,2000
county_df = county_df.loc[:,~county_df.columns.str.contains('FY|10|00')]
len(county_df.columns)
Out[43]:
894
In [44]:
# Removing columns for individual age
county_df = county_df.loc[:,~county_df.columns.str.startswith(('AGE','MAGE','FAGE'))]
len(county_df.columns)
Out[44]:
640
In [45]:
# Removing columns for Industry, Occupation
county_df = county_df.loc[:,~county_df.columns.str.startswith(('IND','OCC'))]
len(county_df.columns)
Out[45]:
596
In [46]:
# Removing Individual Income Columns
county_df = county_df.loc[:,~county_df.columns.str.contains('A15|A25|A35|A45|A55|A65|A75')]
len(county_df.columns)
Out[46]:
366
In [47]:
# Removing columns for Disposable Income and Net Worth
county_df = county_df.loc[:,~county_df.columns.str.startswith(('DI','NW'))]
len(county_df.columns)
Out[47]:
348
In [48]:
# Removing columns for Tapestry Segmentation
county_df = county_df.loc[:,~county_df.columns.str.startswith(('TSE','THH','TADULT'))]
len(county_df.columns)
Out[48]:
190
In [49]:
# Removing columns for Home Value
county_df = county_df.loc[:,~county_df.columns.str.startswith(('VAL'))]
len(county_df.columns)
Out[49]:
181
In [50]:
county_df.columns
Out[50]:
Index(['AAGEBASECY', 'AGGDI_CY', 'AGGHINC_CY', 'AGGINC_CY', 'AGGNW_CY',
       'AIFBASE_CY', 'AIMBASE_CY', 'AMERIND_CY', 'AREA', 'ASIAN_CY',
       ...
       'TOTHU_CY', 'TOTPOP_CY', 'UNEMPRT_CY', 'UNEMP_CY', 'VACANT_CY',
       'WAGEBASECY', 'WHITE_CY', 'WHTFBASECY', 'WHTMBASECY', 'WIDOWED_CY'],
      dtype='object', length=181)
In [51]:
print(obgyn_county_df.shape)
print(county_df.shape)
(1282, 3)
(3142, 181)

Merge dataframes

In [52]:
# Merge provider count and women_df at state level
newcounty_obgyn_df = pd.merge(obgyn_county_df,county_df,left_on=['regionabbr','subregion'], right_on=['ST_ABBREV','NAME'],how='left')
In [53]:
newcounty_obgyn_df.shape
Out[53]:
(1282, 184)
In [78]:
# Create a copy
test_newcounty_df = newcounty_obgyn_df.copy()
test_newcounty_df.head()
Out[78]:
regionabbr subregion Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GQPOP_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPAI_CY HISPASN_CY HISPBLK_CY HISPMLT_CY HISPOTH_CY HISPPI_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY ID LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NAME NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPOTH_CY NHSPPI_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OBJECTID OLDRGENSCY OTHFBASECY OTHMBASECY OTHRACE_CY OWNER_CY PACIFIC_CY PAGEBASECY PCI_CY PIFBASE_CY PIMBASE_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SHAPE SMCOLL_CY SOMEHS_CY STATE_NAME ST_ABBREV Shape_Area Shape_Length TLIFECODE TLIFENAME TOTHH_CY TOTHU_CY TOTPOP_CY UNEMPRT_CY UNEMP_CY VACANT_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
0 CA Los Angeles County 2094 1517296.0 2.359152e+11 3.196410e+11 3.247511e+11 2.224411e+12 35957.0 37602.0 73559.0 4085.699440 1517296.0 805865.0 711431.0 469649.0 70013.0 3.63 3.00 94861.0 660145.0 710686.0 1987624.0 1445895.0 850350.0 850350.0 450243.0 400107.0 5232399.0 6899087.0 4995839.0 2281483.0 8292844.0 312953.0 331081.0 4077284.0 384255.0 3858162.0 421330.0 392960.0 359612.0 328513.0 335961.0 332084.0 327978.0 310887.0 291733.0 246493.0 183490.0 131256.0 90178.0 110499.0 5208957.0 120351.0 255399.0 10288937.0 2130083.0 2353920.0 176419.0 782758.0 5043293.0 10112518.0 371190.0 243110.0 310104.0 280437.0 390334.0 554983.0 394431.0 3369582.0 54769.0 22824.0 45013.0 261906.0 2280356.0 3826.0 5043293.0 2374599.0 1288396.0 2522627.0 2520666.0 73559.0 06037 4057.8835 3890494.0 3663128.0 326230.0 351424.0 396276.0 433863.0 402148.0 368194.0 325765.0 331204.0 323486.0 307396.0 325231.0 261725.0 209710.0 149559.0 102402.0 65741.0 65807.0 5079980.0 8362123.0 3752436.0 35.7 52454.0 36.9 50.6 62751.0 34.6 60024.0 569360.0 2875966.0 7644196.0 251940.0 244185.0 Los Angeles County 3521307.0 18790.0 1494472.0 805337.0 234219.0 24674.0 23411.0 2644741.0 878838.0 5245644.0 2305030.0 205.0 685945.0 1141774.0 1163256.0 2305030.0 1538585.0 27237.0 27237.0 31563.0 13746.0 13491.0 639183.0 682505.0 7967778.0 780531.0 7521290.0 855193.0 795108.0 727806.0 654278.0 667165.0 655570.0 635374.0 636118.0 553458.0 456203.0 333049.0 233658.0 155919.0 176306.0 2535.5 496125.0 10288937.0 1831065.0 {'rings': [[[-13201886.423700001, 3900000.9334... 1300786.0 612414.0 California CA 1.553815e+10 9.723835e+05 13 Next Wave 3369650.0 3576478.0 10288937.0 4.5 236560.0 206828.0 5019340.0 5019340.0 2509432.0 2509908.0 413837.0
1 IL Cook County 1586 395712.0 1.284204e+11 1.771502e+11 1.797564e+11 1.326345e+12 10418.0 10695.0 21113.0 953.145682 395712.0 206041.0 189671.0 237028.0 63978.0 3.36 2.58 88254.0 660769.0 335311.0 1076607.0 830433.0 1233716.0 1233716.0 674544.0 559172.0 2791109.0 3607345.0 2599303.0 1216270.0 4087547.0 158205.0 161652.0 2144742.0 185272.0 2040962.0 217698.0 207243.0 188312.0 166222.0 164629.0 166570.0 174115.0 159117.0 162326.0 139839.0 104629.0 75554.0 54048.0 70522.0 2717277.0 95959.0 129327.0 5274129.0 1058747.0 1171989.0 90942.0 552050.0 1374256.0 5183187.0 250519.0 132865.0 186804.0 169815.0 238778.0 329118.0 243670.0 2007274.0 15131.0 4083.0 22733.0 66348.0 601231.0 706.0 1374256.0 664024.0 726645.0 671160.0 703096.0 21113.0 17031 945.3262 1963911.0 1860397.0 163128.0 166591.0 180196.0 214748.0 206465.0 188502.0 162787.0 160501.0 157805.0 158061.0 164098.0 141495.0 116039.0 82196.0 55154.0 35924.0 35961.0 2556852.0 4301056.0 1851961.0 36.6 47971.0 37.9 50.8 59718.0 35.4 76719.0 256912.0 1442885.0 3078944.0 78362.0 75557.0 Cook County 1813320.0 5982.0 391629.0 1210983.0 87571.0 7441.0 1082.0 2195185.0 237082.0 3899873.0 608672.0 611.0 394574.0 294742.0 313930.0 608672.0 1108536.0 1788.0 1788.0 34083.0 870.0 918.0 321333.0 328243.0 4108653.0 365468.0 3901359.0 432446.0 413708.0 376814.0 329009.0 325130.0 324375.0 332176.0 323215.0 303821.0 255878.0 186825.0 130708.0 89972.0 106483.0 5579.2 153919.0 5274129.0 898740.0 {'rings': [[[-9743209.5443, 5109696.7809000015... 690225.0 237923.0 Illinois IL 4.445620e+09 7.424352e+05 3 Uptown Individuals 2007276.0 2230295.0 5274129.0 6.9 191806.0 223019.0 2859209.0 2859209.0 1452300.0 1406909.0 250105.0
2 NY New York County 1136 212844.0 6.672674e+10 1.091191e+11 1.109282e+11 4.008776e+11 4542.0 4214.0 8756.0 22.950686 212844.0 119067.0 93777.0 48360.0 83690.0 3.02 2.00 136860.0 502791.0 1307852.0 345825.0 406878.0 247085.0 247085.0 133471.0 113614.0 996167.0 1251653.0 956908.0 314952.0 951099.0 35672.0 40691.0 760316.0 71461.0 725473.0 95217.0 86134.0 68890.0 53980.0 50374.0 50312.0 53400.0 32553.0 52503.0 49261.0 38526.0 27262.0 18025.0 22645.0 878322.0 26610.0 30855.0 1660472.0 339808.0 248875.0 66726.0 371255.0 441304.0 1593746.0 107793.0 70466.0 58555.0 49858.0 60209.0 94133.0 78323.0 797304.0 6592.0 2097.0 43951.0 36560.0 187987.0 415.0 441304.0 163702.0 125099.0 233374.0 207930.0 8756.0 36061 22.8287 660480.0 632378.0 37014.0 36186.0 57628.0 82593.0 79654.0 67405.0 53997.0 51176.0 48844.0 48003.0 33820.0 43057.0 37266.0 28231.0 20234.0 12716.0 11948.0 782150.0 1457619.0 517739.0 37.9 61201.0 38.3 48.2 82611.0 37.4 47793.0 1216203.0 557913.0 899778.0 40103.0 33176.0 New York County 745585.0 2164.0 210747.0 203134.0 36719.0 5204.0 506.0 760694.0 80622.0 1219168.0 193191.0 1859.0 137196.0 101593.0 91598.0 193191.0 185125.0 921.0 921.0 66805.0 484.0 437.0 72686.0 76877.0 1420796.0 129089.0 1357851.0 177810.0 165788.0 136295.0 107977.0 101550.0 99156.0 101403.0 66373.0 95560.0 86527.0 66757.0 47496.0 30741.0 34593.0 72736.2 73279.0 1660472.0 612187.0 {'rings': [[[-8242549.350199999, 4966646.20400... 121070.0 71759.0 New York NY 1.024044e+08 1.085936e+05 3 Uptown Individuals 797312.0 890327.0 1660472.0 3.9 39259.0 93015.0 924396.0 924396.0 479062.0 445334.0 68402.0
3 TX Harris County 1124 341640.0 1.132993e+11 1.470200e+11 1.487312e+11 1.000460e+12 14364.0 15637.0 30001.0 1748.811066 341640.0 173439.0 168201.0 193511.0 68781.0 3.49 2.85 89252.0 607353.0 251600.0 848003.0 605813.0 901459.0 901459.0 478023.0 423436.0 2335018.0 3029538.0 2196764.0 1124808.0 3920902.0 176809.0 152219.0 1773341.0 169057.0 1680385.0 196592.0 183051.0 171499.0 154056.0 148493.0 141554.0 141858.0 172608.0 125458.0 102481.0 70111.0 46215.0 29690.0 32228.0 2380573.0 98795.0 145111.0 4735852.0 961416.0 1219972.0 49092.0 345886.0 2035551.0 4686760.0 161383.0 106787.0 153424.0 159410.0 212729.0 290829.0 190407.0 1647247.0 21351.0 3892.0 27998.0 100351.0 703910.0 850.0 2035551.0 1177199.0 608836.0 994167.0 1041384.0 30001.0 48201 1703.4776 1723465.0 1625451.0 182838.0 161982.0 172174.0 206139.0 192088.0 176799.0 153424.0 146647.0 137454.0 132895.0 178822.0 114553.0 90812.0 60215.0 36665.0 20887.0 17674.0 2355279.0 3684970.0 1809576.0 33.5 50339.0 34.3 47.5 59417.0 32.7 72820.0 176533.0 1332331.0 3339578.0 85910.0 87501.0 Harris County 1363826.0 8650.0 337748.0 873461.0 73060.0 8500.0 2608.0 1396274.0 316268.0 2700301.0 712410.0 2624.0 229019.0 342097.0 370313.0 712410.0 888580.0 3458.0 3458.0 31405.0 1768.0 1690.0 359647.0 314201.0 3496806.0 341231.0 3305836.0 402731.0 375139.0 348298.0 307480.0 295140.0 279008.0 274753.0 351430.0 240011.0 193293.0 130326.0 82880.0 50577.0 49902.0 2780.1 173411.0 4735852.0 758671.0 {'rings': [[[-10584325.232, 3445368.621600002]... 606842.0 253587.0 Texas TX 5.991513e+09 8.173476e+05 7 Ethnic Enclaves 1647251.0 1790697.0 4735852.0 5.9 138254.0 143446.0 2573473.0 2573473.0 1284972.0 1288501.0 161546.0
4 AZ Maricopa County 844 184150.0 1.043304e+11 1.333034e+11 1.346919e+11 1.310493e+12 51929.0 46655.0 98584.0 9224.040205 184150.0 97892.0 86258.0 241714.0 64964.0 3.32 2.69 83005.0 816017.0 303705.0 872897.0 597653.0 253576.0 253576.0 124641.0 128935.0 2181523.0 2891837.0 2065771.0 1053223.0 3492063.0 149041.0 138470.0 1694648.0 151115.0 1606050.0 165009.0 153091.0 145864.0 134160.0 133211.0 130665.0 133428.0 147853.0 125740.0 117630.0 90474.0 62955.0 42348.0 51162.0 2217638.0 95969.0 119899.0 4387226.0 855726.0 1066649.0 64540.0 342159.0 1373153.0 4322686.0 163449.0 98771.0 135427.0 144542.0 215958.0 297023.0 213940.0 1605964.0 23948.0 4716.0 16585.0 73969.0 592016.0 1314.0 1373153.0 660605.0 548954.0 682683.0 690470.0 98584.0 04013 9200.1431 1624795.0 1531223.0 154750.0 146575.0 157726.0 172645.0 157924.0 148689.0 134272.0 132380.0 127236.0 123794.0 153320.0 111456.0 101867.0 78340.0 52720.0 33351.0 31426.0 2169588.0 3485723.0 1676208.0 35.8 50661.0 37.0 50.4 59691.0 34.7 102641.0 237947.0 1136843.0 1981147.0 89351.0 87304.0 Maricopa County 1200935.0 74636.0 179434.0 236991.0 102686.0 6019.0 8228.0 2406079.0 160973.0 3014073.0 598035.0 104.0 335212.0 292917.0 305118.0 598035.0 998231.0 9542.0 9542.0 30701.0 4646.0 4896.0 303791.0 285045.0 3319443.0 308841.0 3137273.0 337654.0 311015.0 294553.0 268432.0 265591.0 257901.0 257222.0 301173.0 237196.0 219497.0 168814.0 115675.0 75699.0 82588.0 476.9 176655.0 4387226.0 607760.0 {'rings': [[[-12494641.7694, 4017468.270400002... 711033.0 193382.0 Arizona AZ 3.420485e+10 1.142138e+06 7 Ethnic Enclaves 1605991.0 1813056.0 4387226.0 5.3 115752.0 207065.0 3066684.0 3066684.0 1556262.0 1510422.0 182502.0
In [79]:
test_newcounty_df.drop(['OBJECTID','SHAPE','STATE_NAME','ST_ABBREV','NAME','Shape_Area','Shape_Length','TLIFENAME','ID','TLIFECODE'], axis=1, inplace=True)
test_newcounty_df.head()
Out[79]:
regionabbr subregion Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GQPOP_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPAI_CY HISPASN_CY HISPBLK_CY HISPMLT_CY HISPOTH_CY HISPPI_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPOTH_CY NHSPPI_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OLDRGENSCY OTHFBASECY OTHMBASECY OTHRACE_CY OWNER_CY PACIFIC_CY PAGEBASECY PCI_CY PIFBASE_CY PIMBASE_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SMCOLL_CY SOMEHS_CY TOTHH_CY TOTHU_CY TOTPOP_CY UNEMPRT_CY UNEMP_CY VACANT_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
0 CA Los Angeles County 2094 1517296.0 2.359152e+11 3.196410e+11 3.247511e+11 2.224411e+12 35957.0 37602.0 73559.0 4085.699440 1517296.0 805865.0 711431.0 469649.0 70013.0 3.63 3.00 94861.0 660145.0 710686.0 1987624.0 1445895.0 850350.0 850350.0 450243.0 400107.0 5232399.0 6899087.0 4995839.0 2281483.0 8292844.0 312953.0 331081.0 4077284.0 384255.0 3858162.0 421330.0 392960.0 359612.0 328513.0 335961.0 332084.0 327978.0 310887.0 291733.0 246493.0 183490.0 131256.0 90178.0 110499.0 5208957.0 120351.0 255399.0 10288937.0 2130083.0 2353920.0 176419.0 782758.0 5043293.0 10112518.0 371190.0 243110.0 310104.0 280437.0 390334.0 554983.0 394431.0 3369582.0 54769.0 22824.0 45013.0 261906.0 2280356.0 3826.0 5043293.0 2374599.0 1288396.0 2522627.0 2520666.0 73559.0 4057.8835 3890494.0 3663128.0 326230.0 351424.0 396276.0 433863.0 402148.0 368194.0 325765.0 331204.0 323486.0 307396.0 325231.0 261725.0 209710.0 149559.0 102402.0 65741.0 65807.0 5079980.0 8362123.0 3752436.0 35.7 52454.0 36.9 50.6 62751.0 34.6 60024.0 569360.0 2875966.0 7644196.0 251940.0 244185.0 3521307.0 18790.0 1494472.0 805337.0 234219.0 24674.0 23411.0 2644741.0 878838.0 5245644.0 2305030.0 685945.0 1141774.0 1163256.0 2305030.0 1538585.0 27237.0 27237.0 31563.0 13746.0 13491.0 639183.0 682505.0 7967778.0 780531.0 7521290.0 855193.0 795108.0 727806.0 654278.0 667165.0 655570.0 635374.0 636118.0 553458.0 456203.0 333049.0 233658.0 155919.0 176306.0 2535.5 496125.0 10288937.0 1831065.0 1300786.0 612414.0 3369650.0 3576478.0 10288937.0 4.5 236560.0 206828.0 5019340.0 5019340.0 2509432.0 2509908.0 413837.0
1 IL Cook County 1586 395712.0 1.284204e+11 1.771502e+11 1.797564e+11 1.326345e+12 10418.0 10695.0 21113.0 953.145682 395712.0 206041.0 189671.0 237028.0 63978.0 3.36 2.58 88254.0 660769.0 335311.0 1076607.0 830433.0 1233716.0 1233716.0 674544.0 559172.0 2791109.0 3607345.0 2599303.0 1216270.0 4087547.0 158205.0 161652.0 2144742.0 185272.0 2040962.0 217698.0 207243.0 188312.0 166222.0 164629.0 166570.0 174115.0 159117.0 162326.0 139839.0 104629.0 75554.0 54048.0 70522.0 2717277.0 95959.0 129327.0 5274129.0 1058747.0 1171989.0 90942.0 552050.0 1374256.0 5183187.0 250519.0 132865.0 186804.0 169815.0 238778.0 329118.0 243670.0 2007274.0 15131.0 4083.0 22733.0 66348.0 601231.0 706.0 1374256.0 664024.0 726645.0 671160.0 703096.0 21113.0 945.3262 1963911.0 1860397.0 163128.0 166591.0 180196.0 214748.0 206465.0 188502.0 162787.0 160501.0 157805.0 158061.0 164098.0 141495.0 116039.0 82196.0 55154.0 35924.0 35961.0 2556852.0 4301056.0 1851961.0 36.6 47971.0 37.9 50.8 59718.0 35.4 76719.0 256912.0 1442885.0 3078944.0 78362.0 75557.0 1813320.0 5982.0 391629.0 1210983.0 87571.0 7441.0 1082.0 2195185.0 237082.0 3899873.0 608672.0 394574.0 294742.0 313930.0 608672.0 1108536.0 1788.0 1788.0 34083.0 870.0 918.0 321333.0 328243.0 4108653.0 365468.0 3901359.0 432446.0 413708.0 376814.0 329009.0 325130.0 324375.0 332176.0 323215.0 303821.0 255878.0 186825.0 130708.0 89972.0 106483.0 5579.2 153919.0 5274129.0 898740.0 690225.0 237923.0 2007276.0 2230295.0 5274129.0 6.9 191806.0 223019.0 2859209.0 2859209.0 1452300.0 1406909.0 250105.0
2 NY New York County 1136 212844.0 6.672674e+10 1.091191e+11 1.109282e+11 4.008776e+11 4542.0 4214.0 8756.0 22.950686 212844.0 119067.0 93777.0 48360.0 83690.0 3.02 2.00 136860.0 502791.0 1307852.0 345825.0 406878.0 247085.0 247085.0 133471.0 113614.0 996167.0 1251653.0 956908.0 314952.0 951099.0 35672.0 40691.0 760316.0 71461.0 725473.0 95217.0 86134.0 68890.0 53980.0 50374.0 50312.0 53400.0 32553.0 52503.0 49261.0 38526.0 27262.0 18025.0 22645.0 878322.0 26610.0 30855.0 1660472.0 339808.0 248875.0 66726.0 371255.0 441304.0 1593746.0 107793.0 70466.0 58555.0 49858.0 60209.0 94133.0 78323.0 797304.0 6592.0 2097.0 43951.0 36560.0 187987.0 415.0 441304.0 163702.0 125099.0 233374.0 207930.0 8756.0 22.8287 660480.0 632378.0 37014.0 36186.0 57628.0 82593.0 79654.0 67405.0 53997.0 51176.0 48844.0 48003.0 33820.0 43057.0 37266.0 28231.0 20234.0 12716.0 11948.0 782150.0 1457619.0 517739.0 37.9 61201.0 38.3 48.2 82611.0 37.4 47793.0 1216203.0 557913.0 899778.0 40103.0 33176.0 745585.0 2164.0 210747.0 203134.0 36719.0 5204.0 506.0 760694.0 80622.0 1219168.0 193191.0 137196.0 101593.0 91598.0 193191.0 185125.0 921.0 921.0 66805.0 484.0 437.0 72686.0 76877.0 1420796.0 129089.0 1357851.0 177810.0 165788.0 136295.0 107977.0 101550.0 99156.0 101403.0 66373.0 95560.0 86527.0 66757.0 47496.0 30741.0 34593.0 72736.2 73279.0 1660472.0 612187.0 121070.0 71759.0 797312.0 890327.0 1660472.0 3.9 39259.0 93015.0 924396.0 924396.0 479062.0 445334.0 68402.0
3 TX Harris County 1124 341640.0 1.132993e+11 1.470200e+11 1.487312e+11 1.000460e+12 14364.0 15637.0 30001.0 1748.811066 341640.0 173439.0 168201.0 193511.0 68781.0 3.49 2.85 89252.0 607353.0 251600.0 848003.0 605813.0 901459.0 901459.0 478023.0 423436.0 2335018.0 3029538.0 2196764.0 1124808.0 3920902.0 176809.0 152219.0 1773341.0 169057.0 1680385.0 196592.0 183051.0 171499.0 154056.0 148493.0 141554.0 141858.0 172608.0 125458.0 102481.0 70111.0 46215.0 29690.0 32228.0 2380573.0 98795.0 145111.0 4735852.0 961416.0 1219972.0 49092.0 345886.0 2035551.0 4686760.0 161383.0 106787.0 153424.0 159410.0 212729.0 290829.0 190407.0 1647247.0 21351.0 3892.0 27998.0 100351.0 703910.0 850.0 2035551.0 1177199.0 608836.0 994167.0 1041384.0 30001.0 1703.4776 1723465.0 1625451.0 182838.0 161982.0 172174.0 206139.0 192088.0 176799.0 153424.0 146647.0 137454.0 132895.0 178822.0 114553.0 90812.0 60215.0 36665.0 20887.0 17674.0 2355279.0 3684970.0 1809576.0 33.5 50339.0 34.3 47.5 59417.0 32.7 72820.0 176533.0 1332331.0 3339578.0 85910.0 87501.0 1363826.0 8650.0 337748.0 873461.0 73060.0 8500.0 2608.0 1396274.0 316268.0 2700301.0 712410.0 229019.0 342097.0 370313.0 712410.0 888580.0 3458.0 3458.0 31405.0 1768.0 1690.0 359647.0 314201.0 3496806.0 341231.0 3305836.0 402731.0 375139.0 348298.0 307480.0 295140.0 279008.0 274753.0 351430.0 240011.0 193293.0 130326.0 82880.0 50577.0 49902.0 2780.1 173411.0 4735852.0 758671.0 606842.0 253587.0 1647251.0 1790697.0 4735852.0 5.9 138254.0 143446.0 2573473.0 2573473.0 1284972.0 1288501.0 161546.0
4 AZ Maricopa County 844 184150.0 1.043304e+11 1.333034e+11 1.346919e+11 1.310493e+12 51929.0 46655.0 98584.0 9224.040205 184150.0 97892.0 86258.0 241714.0 64964.0 3.32 2.69 83005.0 816017.0 303705.0 872897.0 597653.0 253576.0 253576.0 124641.0 128935.0 2181523.0 2891837.0 2065771.0 1053223.0 3492063.0 149041.0 138470.0 1694648.0 151115.0 1606050.0 165009.0 153091.0 145864.0 134160.0 133211.0 130665.0 133428.0 147853.0 125740.0 117630.0 90474.0 62955.0 42348.0 51162.0 2217638.0 95969.0 119899.0 4387226.0 855726.0 1066649.0 64540.0 342159.0 1373153.0 4322686.0 163449.0 98771.0 135427.0 144542.0 215958.0 297023.0 213940.0 1605964.0 23948.0 4716.0 16585.0 73969.0 592016.0 1314.0 1373153.0 660605.0 548954.0 682683.0 690470.0 98584.0 9200.1431 1624795.0 1531223.0 154750.0 146575.0 157726.0 172645.0 157924.0 148689.0 134272.0 132380.0 127236.0 123794.0 153320.0 111456.0 101867.0 78340.0 52720.0 33351.0 31426.0 2169588.0 3485723.0 1676208.0 35.8 50661.0 37.0 50.4 59691.0 34.7 102641.0 237947.0 1136843.0 1981147.0 89351.0 87304.0 1200935.0 74636.0 179434.0 236991.0 102686.0 6019.0 8228.0 2406079.0 160973.0 3014073.0 598035.0 335212.0 292917.0 305118.0 598035.0 998231.0 9542.0 9542.0 30701.0 4646.0 4896.0 303791.0 285045.0 3319443.0 308841.0 3137273.0 337654.0 311015.0 294553.0 268432.0 265591.0 257901.0 257222.0 301173.0 237196.0 219497.0 168814.0 115675.0 75699.0 82588.0 476.9 176655.0 4387226.0 607760.0 711033.0 193382.0 1605991.0 1813056.0 4387226.0 5.3 115752.0 207065.0 3066684.0 3066684.0 1556262.0 1510422.0 182502.0
In [80]:
# Change Provider Count to Float
test_newcounty_df['Provider_Count'] = test_newcounty_df['Provider_Count'].astype(float)
In [125]:
test_newcounty_df.head()
Out[125]:
regionabbr subregion Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPMLT_CY HISPOTH_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OLDRGENSCY OTHFBASECY OTHRACE_CY OWNER_CY PCI_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SMCOLL_CY SOMEHS_CY TOTHH_CY TOTHU_CY TOTPOP_CY UNEMPRT_CY UNEMP_CY VACANT_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
0 CA Los Angeles County 2094.0 1517296.0 2.359152e+11 3.196410e+11 3.247511e+11 2.224411e+12 35957.0 37602.0 73559.0 4085.699440 1517296.0 805865.0 711431.0 469649.0 70013.0 3.63 3.00 94861.0 660145.0 710686.0 1987624.0 1445895.0 850350.0 850350.0 450243.0 400107.0 5232399.0 6899087.0 4995839.0 2281483.0 8292844.0 312953.0 331081.0 4077284.0 384255.0 3858162.0 421330.0 392960.0 359612.0 328513.0 335961.0 332084.0 327978.0 310887.0 291733.0 246493.0 183490.0 131256.0 90178.0 110499.0 5208957.0 120351.0 255399.0 10288937.0 2130083.0 2353920.0 782758.0 5043293.0 10112518.0 371190.0 243110.0 310104.0 280437.0 390334.0 554983.0 394431.0 3369582.0 261906.0 2280356.0 5043293.0 2374599.0 1288396.0 2522627.0 2520666.0 73559.0 4057.8835 3890494.0 3663128.0 326230.0 351424.0 396276.0 433863.0 402148.0 368194.0 325765.0 331204.0 323486.0 307396.0 325231.0 261725.0 209710.0 149559.0 102402.0 65741.0 65807.0 5079980.0 8362123.0 3752436.0 35.7 52454.0 36.9 50.6 62751.0 34.6 60024.0 569360.0 2875966.0 7644196.0 251940.0 244185.0 3521307.0 18790.0 1494472.0 805337.0 234219.0 2644741.0 878838.0 5245644.0 2305030.0 685945.0 1141774.0 2305030.0 1538585.0 31563.0 639183.0 682505.0 7967778.0 780531.0 7521290.0 855193.0 795108.0 727806.0 654278.0 667165.0 655570.0 635374.0 636118.0 553458.0 456203.0 333049.0 233658.0 155919.0 176306.0 2535.5 496125.0 10288937.0 1831065.0 1300786.0 612414.0 3369650.0 3576478.0 10288937.0 4.5 236560.0 206828.0 5019340.0 5019340.0 2509432.0 2509908.0 413837.0
1 IL Cook County 1586.0 395712.0 1.284204e+11 1.771502e+11 1.797564e+11 1.326345e+12 10418.0 10695.0 21113.0 953.145682 395712.0 206041.0 189671.0 237028.0 63978.0 3.36 2.58 88254.0 660769.0 335311.0 1076607.0 830433.0 1233716.0 1233716.0 674544.0 559172.0 2791109.0 3607345.0 2599303.0 1216270.0 4087547.0 158205.0 161652.0 2144742.0 185272.0 2040962.0 217698.0 207243.0 188312.0 166222.0 164629.0 166570.0 174115.0 159117.0 162326.0 139839.0 104629.0 75554.0 54048.0 70522.0 2717277.0 95959.0 129327.0 5274129.0 1058747.0 1171989.0 552050.0 1374256.0 5183187.0 250519.0 132865.0 186804.0 169815.0 238778.0 329118.0 243670.0 2007274.0 66348.0 601231.0 1374256.0 664024.0 726645.0 671160.0 703096.0 21113.0 945.3262 1963911.0 1860397.0 163128.0 166591.0 180196.0 214748.0 206465.0 188502.0 162787.0 160501.0 157805.0 158061.0 164098.0 141495.0 116039.0 82196.0 55154.0 35924.0 35961.0 2556852.0 4301056.0 1851961.0 36.6 47971.0 37.9 50.8 59718.0 35.4 76719.0 256912.0 1442885.0 3078944.0 78362.0 75557.0 1813320.0 5982.0 391629.0 1210983.0 87571.0 2195185.0 237082.0 3899873.0 608672.0 394574.0 294742.0 608672.0 1108536.0 34083.0 321333.0 328243.0 4108653.0 365468.0 3901359.0 432446.0 413708.0 376814.0 329009.0 325130.0 324375.0 332176.0 323215.0 303821.0 255878.0 186825.0 130708.0 89972.0 106483.0 5579.2 153919.0 5274129.0 898740.0 690225.0 237923.0 2007276.0 2230295.0 5274129.0 6.9 191806.0 223019.0 2859209.0 2859209.0 1452300.0 1406909.0 250105.0
2 NY New York County 1136.0 212844.0 6.672674e+10 1.091191e+11 1.109282e+11 4.008776e+11 4542.0 4214.0 8756.0 22.950686 212844.0 119067.0 93777.0 48360.0 83690.0 3.02 2.00 136860.0 502791.0 1307852.0 345825.0 406878.0 247085.0 247085.0 133471.0 113614.0 996167.0 1251653.0 956908.0 314952.0 951099.0 35672.0 40691.0 760316.0 71461.0 725473.0 95217.0 86134.0 68890.0 53980.0 50374.0 50312.0 53400.0 32553.0 52503.0 49261.0 38526.0 27262.0 18025.0 22645.0 878322.0 26610.0 30855.0 1660472.0 339808.0 248875.0 371255.0 441304.0 1593746.0 107793.0 70466.0 58555.0 49858.0 60209.0 94133.0 78323.0 797304.0 36560.0 187987.0 441304.0 163702.0 125099.0 233374.0 207930.0 8756.0 22.8287 660480.0 632378.0 37014.0 36186.0 57628.0 82593.0 79654.0 67405.0 53997.0 51176.0 48844.0 48003.0 33820.0 43057.0 37266.0 28231.0 20234.0 12716.0 11948.0 782150.0 1457619.0 517739.0 37.9 61201.0 38.3 48.2 82611.0 37.4 47793.0 1216203.0 557913.0 899778.0 40103.0 33176.0 745585.0 2164.0 210747.0 203134.0 36719.0 760694.0 80622.0 1219168.0 193191.0 137196.0 101593.0 193191.0 185125.0 66805.0 72686.0 76877.0 1420796.0 129089.0 1357851.0 177810.0 165788.0 136295.0 107977.0 101550.0 99156.0 101403.0 66373.0 95560.0 86527.0 66757.0 47496.0 30741.0 34593.0 72736.2 73279.0 1660472.0 612187.0 121070.0 71759.0 797312.0 890327.0 1660472.0 3.9 39259.0 93015.0 924396.0 924396.0 479062.0 445334.0 68402.0
3 TX Harris County 1124.0 341640.0 1.132993e+11 1.470200e+11 1.487312e+11 1.000460e+12 14364.0 15637.0 30001.0 1748.811066 341640.0 173439.0 168201.0 193511.0 68781.0 3.49 2.85 89252.0 607353.0 251600.0 848003.0 605813.0 901459.0 901459.0 478023.0 423436.0 2335018.0 3029538.0 2196764.0 1124808.0 3920902.0 176809.0 152219.0 1773341.0 169057.0 1680385.0 196592.0 183051.0 171499.0 154056.0 148493.0 141554.0 141858.0 172608.0 125458.0 102481.0 70111.0 46215.0 29690.0 32228.0 2380573.0 98795.0 145111.0 4735852.0 961416.0 1219972.0 345886.0 2035551.0 4686760.0 161383.0 106787.0 153424.0 159410.0 212729.0 290829.0 190407.0 1647247.0 100351.0 703910.0 2035551.0 1177199.0 608836.0 994167.0 1041384.0 30001.0 1703.4776 1723465.0 1625451.0 182838.0 161982.0 172174.0 206139.0 192088.0 176799.0 153424.0 146647.0 137454.0 132895.0 178822.0 114553.0 90812.0 60215.0 36665.0 20887.0 17674.0 2355279.0 3684970.0 1809576.0 33.5 50339.0 34.3 47.5 59417.0 32.7 72820.0 176533.0 1332331.0 3339578.0 85910.0 87501.0 1363826.0 8650.0 337748.0 873461.0 73060.0 1396274.0 316268.0 2700301.0 712410.0 229019.0 342097.0 712410.0 888580.0 31405.0 359647.0 314201.0 3496806.0 341231.0 3305836.0 402731.0 375139.0 348298.0 307480.0 295140.0 279008.0 274753.0 351430.0 240011.0 193293.0 130326.0 82880.0 50577.0 49902.0 2780.1 173411.0 4735852.0 758671.0 606842.0 253587.0 1647251.0 1790697.0 4735852.0 5.9 138254.0 143446.0 2573473.0 2573473.0 1284972.0 1288501.0 161546.0
4 AZ Maricopa County 844.0 184150.0 1.043304e+11 1.333034e+11 1.346919e+11 1.310493e+12 51929.0 46655.0 98584.0 9224.040205 184150.0 97892.0 86258.0 241714.0 64964.0 3.32 2.69 83005.0 816017.0 303705.0 872897.0 597653.0 253576.0 253576.0 124641.0 128935.0 2181523.0 2891837.0 2065771.0 1053223.0 3492063.0 149041.0 138470.0 1694648.0 151115.0 1606050.0 165009.0 153091.0 145864.0 134160.0 133211.0 130665.0 133428.0 147853.0 125740.0 117630.0 90474.0 62955.0 42348.0 51162.0 2217638.0 95969.0 119899.0 4387226.0 855726.0 1066649.0 342159.0 1373153.0 4322686.0 163449.0 98771.0 135427.0 144542.0 215958.0 297023.0 213940.0 1605964.0 73969.0 592016.0 1373153.0 660605.0 548954.0 682683.0 690470.0 98584.0 9200.1431 1624795.0 1531223.0 154750.0 146575.0 157726.0 172645.0 157924.0 148689.0 134272.0 132380.0 127236.0 123794.0 153320.0 111456.0 101867.0 78340.0 52720.0 33351.0 31426.0 2169588.0 3485723.0 1676208.0 35.8 50661.0 37.0 50.4 59691.0 34.7 102641.0 237947.0 1136843.0 1981147.0 89351.0 87304.0 1200935.0 74636.0 179434.0 236991.0 102686.0 2406079.0 160973.0 3014073.0 598035.0 335212.0 292917.0 598035.0 998231.0 30701.0 303791.0 285045.0 3319443.0 308841.0 3137273.0 337654.0 311015.0 294553.0 268432.0 265591.0 257901.0 257222.0 301173.0 237196.0 219497.0 168814.0 115675.0 75699.0 82588.0 476.9 176655.0 4387226.0 607760.0 711033.0 193382.0 1605991.0 1813056.0 4387226.0 5.3 115752.0 207065.0 3066684.0 3066684.0 1556262.0 1510422.0 182502.0

Handle Missing Values

In [82]:
# Any missing values in the data
test_newcounty_df.isnull().sum().sum()
Out[82]:
21375
In [83]:
# Columns with missing values
test_newcounty_df.isnull().sum()
Out[83]:
regionabbr          0
subregion           0
Provider_Count      0
AAGEBASECY        125
AGGDI_CY          125
AGGHINC_CY        125
AGGINC_CY         125
AGGNW_CY          125
AIFBASE_CY        125
AIMBASE_CY        125
AMERIND_CY        125
AREA              125
ASIAN_CY          125
ASNFBASECY        125
ASNMBASECY        125
ASSCDEG_CY        125
AVGDI_CY          125
AVGFMSZ_CY        125
AVGHHSZ_CY        125
AVGHINC_CY        125
AVGNW_CY          125
AVGVAL_CY         125
BABYBOOMCY        125
BACHDEG_CY        125
BAGEBASECY        125
BLACK_CY          125
BLKFBASECY        125
BLKMBASECY        125
CIVLBFR_CY        125
EDUCBASECY        125
                 ... 
POP30_CY          125
POP35_CY          125
POP40_CY          125
POP45_CY          125
POP50_CY          125
POP55_CY          125
POP5_CY           125
POP60_CY          125
POP65_CY          125
POP70_CY          125
POP75_CY          125
POP80_CY          125
POP85_CY          125
POPDENS_CY        125
RACE2UP_CY        125
RACEBASECY        125
RENTER_CY         125
SMCOLL_CY         125
SOMEHS_CY         125
TOTHH_CY          125
TOTHU_CY          125
TOTPOP_CY         125
UNEMPRT_CY        125
UNEMP_CY          125
VACANT_CY         125
WAGEBASECY        125
WHITE_CY          125
WHTFBASECY        125
WHTMBASECY        125
WIDOWED_CY        125
Length: 174, dtype: int64
In [84]:
# Dataframe of rows and columns with null
null_data = test_newcounty_df[test_newcounty_df.isnull().any(axis=1)]
null_data.head()
Out[84]:
regionabbr subregion Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GQPOP_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPAI_CY HISPASN_CY HISPBLK_CY HISPMLT_CY HISPOTH_CY HISPPI_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPOTH_CY NHSPPI_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OLDRGENSCY OTHFBASECY OTHMBASECY OTHRACE_CY OWNER_CY PACIFIC_CY PAGEBASECY PCI_CY PIFBASE_CY PIMBASE_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SMCOLL_CY SOMEHS_CY TOTHH_CY TOTHU_CY TOTPOP_CY UNEMPRT_CY UNEMP_CY VACANT_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
29 CA City and County of San Francisco 330.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
30 CA Sacramento 329.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
35 MD City of Baltimore 298.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
39 HI City and County of Honolulu 286.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
50 CO City and County of Denver 251.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
In [85]:
null_data.shape
Out[85]:
(125, 174)
In [86]:
# Rows where all columns (except region, subregion, Provider Count) are null
test_newcounty_df.index[test_newcounty_df.iloc[:,3:].isnull().all(1)]
Out[86]:
Int64Index([  29,   30,   35,   39,   50,   70,   78,  128,  132,  157,
            ...
            1244, 1245, 1251, 1254, 1259, 1266, 1268, 1271, 1278, 1280],
           dtype='int64', length=125)
In [87]:
test_newcounty_df.dropna(inplace=True)
In [88]:
test_newcounty_df.isnull().sum().sum()
Out[88]:
0
In [90]:
# Check if any values are 0 in the dataframe
# test_newstate_df.isnull().values.any()
test_newcounty_df.columns[test_newcounty_df.eq(0).any()].tolist()
Out[90]:
['GQPOP_CY',
 'HISPAI_CY',
 'HISPASN_CY',
 'HISPBLK_CY',
 'HISPPI_CY',
 'NHSPOTH_CY',
 'NHSPPI_CY',
 'OTHMBASECY',
 'PACIFIC_CY',
 'PAGEBASECY',
 'PIFBASE_CY',
 'PIMBASE_CY']
In [91]:
test_newcounty_df.drop(['GQPOP_CY','HISPAI_CY','HISPASN_CY','HISPBLK_CY','HISPPI_CY','NHSPOTH_CY','NHSPPI_CY','OTHMBASECY','PACIFIC_CY','PAGEBASECY','PIFBASE_CY','PIMBASE_CY'], axis=1, inplace=True)
In [92]:
test_newcounty_df.head()
Out[92]:
regionabbr subregion Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPMLT_CY HISPOTH_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OLDRGENSCY OTHFBASECY OTHRACE_CY OWNER_CY PCI_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SMCOLL_CY SOMEHS_CY TOTHH_CY TOTHU_CY TOTPOP_CY UNEMPRT_CY UNEMP_CY VACANT_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
0 CA Los Angeles County 2094.0 1517296.0 2.359152e+11 3.196410e+11 3.247511e+11 2.224411e+12 35957.0 37602.0 73559.0 4085.699440 1517296.0 805865.0 711431.0 469649.0 70013.0 3.63 3.00 94861.0 660145.0 710686.0 1987624.0 1445895.0 850350.0 850350.0 450243.0 400107.0 5232399.0 6899087.0 4995839.0 2281483.0 8292844.0 312953.0 331081.0 4077284.0 384255.0 3858162.0 421330.0 392960.0 359612.0 328513.0 335961.0 332084.0 327978.0 310887.0 291733.0 246493.0 183490.0 131256.0 90178.0 110499.0 5208957.0 120351.0 255399.0 10288937.0 2130083.0 2353920.0 782758.0 5043293.0 10112518.0 371190.0 243110.0 310104.0 280437.0 390334.0 554983.0 394431.0 3369582.0 261906.0 2280356.0 5043293.0 2374599.0 1288396.0 2522627.0 2520666.0 73559.0 4057.8835 3890494.0 3663128.0 326230.0 351424.0 396276.0 433863.0 402148.0 368194.0 325765.0 331204.0 323486.0 307396.0 325231.0 261725.0 209710.0 149559.0 102402.0 65741.0 65807.0 5079980.0 8362123.0 3752436.0 35.7 52454.0 36.9 50.6 62751.0 34.6 60024.0 569360.0 2875966.0 7644196.0 251940.0 244185.0 3521307.0 18790.0 1494472.0 805337.0 234219.0 2644741.0 878838.0 5245644.0 2305030.0 685945.0 1141774.0 2305030.0 1538585.0 31563.0 639183.0 682505.0 7967778.0 780531.0 7521290.0 855193.0 795108.0 727806.0 654278.0 667165.0 655570.0 635374.0 636118.0 553458.0 456203.0 333049.0 233658.0 155919.0 176306.0 2535.5 496125.0 10288937.0 1831065.0 1300786.0 612414.0 3369650.0 3576478.0 10288937.0 4.5 236560.0 206828.0 5019340.0 5019340.0 2509432.0 2509908.0 413837.0
1 IL Cook County 1586.0 395712.0 1.284204e+11 1.771502e+11 1.797564e+11 1.326345e+12 10418.0 10695.0 21113.0 953.145682 395712.0 206041.0 189671.0 237028.0 63978.0 3.36 2.58 88254.0 660769.0 335311.0 1076607.0 830433.0 1233716.0 1233716.0 674544.0 559172.0 2791109.0 3607345.0 2599303.0 1216270.0 4087547.0 158205.0 161652.0 2144742.0 185272.0 2040962.0 217698.0 207243.0 188312.0 166222.0 164629.0 166570.0 174115.0 159117.0 162326.0 139839.0 104629.0 75554.0 54048.0 70522.0 2717277.0 95959.0 129327.0 5274129.0 1058747.0 1171989.0 552050.0 1374256.0 5183187.0 250519.0 132865.0 186804.0 169815.0 238778.0 329118.0 243670.0 2007274.0 66348.0 601231.0 1374256.0 664024.0 726645.0 671160.0 703096.0 21113.0 945.3262 1963911.0 1860397.0 163128.0 166591.0 180196.0 214748.0 206465.0 188502.0 162787.0 160501.0 157805.0 158061.0 164098.0 141495.0 116039.0 82196.0 55154.0 35924.0 35961.0 2556852.0 4301056.0 1851961.0 36.6 47971.0 37.9 50.8 59718.0 35.4 76719.0 256912.0 1442885.0 3078944.0 78362.0 75557.0 1813320.0 5982.0 391629.0 1210983.0 87571.0 2195185.0 237082.0 3899873.0 608672.0 394574.0 294742.0 608672.0 1108536.0 34083.0 321333.0 328243.0 4108653.0 365468.0 3901359.0 432446.0 413708.0 376814.0 329009.0 325130.0 324375.0 332176.0 323215.0 303821.0 255878.0 186825.0 130708.0 89972.0 106483.0 5579.2 153919.0 5274129.0 898740.0 690225.0 237923.0 2007276.0 2230295.0 5274129.0 6.9 191806.0 223019.0 2859209.0 2859209.0 1452300.0 1406909.0 250105.0
2 NY New York County 1136.0 212844.0 6.672674e+10 1.091191e+11 1.109282e+11 4.008776e+11 4542.0 4214.0 8756.0 22.950686 212844.0 119067.0 93777.0 48360.0 83690.0 3.02 2.00 136860.0 502791.0 1307852.0 345825.0 406878.0 247085.0 247085.0 133471.0 113614.0 996167.0 1251653.0 956908.0 314952.0 951099.0 35672.0 40691.0 760316.0 71461.0 725473.0 95217.0 86134.0 68890.0 53980.0 50374.0 50312.0 53400.0 32553.0 52503.0 49261.0 38526.0 27262.0 18025.0 22645.0 878322.0 26610.0 30855.0 1660472.0 339808.0 248875.0 371255.0 441304.0 1593746.0 107793.0 70466.0 58555.0 49858.0 60209.0 94133.0 78323.0 797304.0 36560.0 187987.0 441304.0 163702.0 125099.0 233374.0 207930.0 8756.0 22.8287 660480.0 632378.0 37014.0 36186.0 57628.0 82593.0 79654.0 67405.0 53997.0 51176.0 48844.0 48003.0 33820.0 43057.0 37266.0 28231.0 20234.0 12716.0 11948.0 782150.0 1457619.0 517739.0 37.9 61201.0 38.3 48.2 82611.0 37.4 47793.0 1216203.0 557913.0 899778.0 40103.0 33176.0 745585.0 2164.0 210747.0 203134.0 36719.0 760694.0 80622.0 1219168.0 193191.0 137196.0 101593.0 193191.0 185125.0 66805.0 72686.0 76877.0 1420796.0 129089.0 1357851.0 177810.0 165788.0 136295.0 107977.0 101550.0 99156.0 101403.0 66373.0 95560.0 86527.0 66757.0 47496.0 30741.0 34593.0 72736.2 73279.0 1660472.0 612187.0 121070.0 71759.0 797312.0 890327.0 1660472.0 3.9 39259.0 93015.0 924396.0 924396.0 479062.0 445334.0 68402.0
3 TX Harris County 1124.0 341640.0 1.132993e+11 1.470200e+11 1.487312e+11 1.000460e+12 14364.0 15637.0 30001.0 1748.811066 341640.0 173439.0 168201.0 193511.0 68781.0 3.49 2.85 89252.0 607353.0 251600.0 848003.0 605813.0 901459.0 901459.0 478023.0 423436.0 2335018.0 3029538.0 2196764.0 1124808.0 3920902.0 176809.0 152219.0 1773341.0 169057.0 1680385.0 196592.0 183051.0 171499.0 154056.0 148493.0 141554.0 141858.0 172608.0 125458.0 102481.0 70111.0 46215.0 29690.0 32228.0 2380573.0 98795.0 145111.0 4735852.0 961416.0 1219972.0 345886.0 2035551.0 4686760.0 161383.0 106787.0 153424.0 159410.0 212729.0 290829.0 190407.0 1647247.0 100351.0 703910.0 2035551.0 1177199.0 608836.0 994167.0 1041384.0 30001.0 1703.4776 1723465.0 1625451.0 182838.0 161982.0 172174.0 206139.0 192088.0 176799.0 153424.0 146647.0 137454.0 132895.0 178822.0 114553.0 90812.0 60215.0 36665.0 20887.0 17674.0 2355279.0 3684970.0 1809576.0 33.5 50339.0 34.3 47.5 59417.0 32.7 72820.0 176533.0 1332331.0 3339578.0 85910.0 87501.0 1363826.0 8650.0 337748.0 873461.0 73060.0 1396274.0 316268.0 2700301.0 712410.0 229019.0 342097.0 712410.0 888580.0 31405.0 359647.0 314201.0 3496806.0 341231.0 3305836.0 402731.0 375139.0 348298.0 307480.0 295140.0 279008.0 274753.0 351430.0 240011.0 193293.0 130326.0 82880.0 50577.0 49902.0 2780.1 173411.0 4735852.0 758671.0 606842.0 253587.0 1647251.0 1790697.0 4735852.0 5.9 138254.0 143446.0 2573473.0 2573473.0 1284972.0 1288501.0 161546.0
4 AZ Maricopa County 844.0 184150.0 1.043304e+11 1.333034e+11 1.346919e+11 1.310493e+12 51929.0 46655.0 98584.0 9224.040205 184150.0 97892.0 86258.0 241714.0 64964.0 3.32 2.69 83005.0 816017.0 303705.0 872897.0 597653.0 253576.0 253576.0 124641.0 128935.0 2181523.0 2891837.0 2065771.0 1053223.0 3492063.0 149041.0 138470.0 1694648.0 151115.0 1606050.0 165009.0 153091.0 145864.0 134160.0 133211.0 130665.0 133428.0 147853.0 125740.0 117630.0 90474.0 62955.0 42348.0 51162.0 2217638.0 95969.0 119899.0 4387226.0 855726.0 1066649.0 342159.0 1373153.0 4322686.0 163449.0 98771.0 135427.0 144542.0 215958.0 297023.0 213940.0 1605964.0 73969.0 592016.0 1373153.0 660605.0 548954.0 682683.0 690470.0 98584.0 9200.1431 1624795.0 1531223.0 154750.0 146575.0 157726.0 172645.0 157924.0 148689.0 134272.0 132380.0 127236.0 123794.0 153320.0 111456.0 101867.0 78340.0 52720.0 33351.0 31426.0 2169588.0 3485723.0 1676208.0 35.8 50661.0 37.0 50.4 59691.0 34.7 102641.0 237947.0 1136843.0 1981147.0 89351.0 87304.0 1200935.0 74636.0 179434.0 236991.0 102686.0 2406079.0 160973.0 3014073.0 598035.0 335212.0 292917.0 598035.0 998231.0 30701.0 303791.0 285045.0 3319443.0 308841.0 3137273.0 337654.0 311015.0 294553.0 268432.0 265591.0 257901.0 257222.0 301173.0 237196.0 219497.0 168814.0 115675.0 75699.0 82588.0 476.9 176655.0 4387226.0 607760.0 711033.0 193382.0 1605991.0 1813056.0 4387226.0 5.3 115752.0 207065.0 3066684.0 3066684.0 1556262.0 1510422.0 182502.0
In [93]:
test_newcounty_df.columns[test_newcounty_df.eq(0).any()].tolist()
Out[93]:
[]
In [94]:
test_newcounty_df['MEDHINC_CY'] = test_newcounty_df['MEDHINC_CY'].astype(float)
type(test_newcounty_df['MEDHINC_CY'][0])
Out[94]:
numpy.float64

k-means

Determine optimal clusters using within cluster SSE

In [116]:
# Transform Data
from sklearn.preprocessing import StandardScaler
from sklearn.preprocessing import PowerTransformer
# pt_county = PowerTransformer(method='box-cox')
sc_county = StandardScaler()
newcounty_df_pt = sc_county.fit_transform(test_newcounty_df.iloc[:,2:])
In [117]:
from sklearn.cluster import KMeans
sns.set(rc={'figure.figsize':(15,8)})
distortions = []
for i in range(1,20):
    km = KMeans(n_clusters=i,
                init='k-means++',
                n_init=10,
                max_iter=300,
                random_state=0)
    km.fit(newcounty_df_pt)
    distortions.append(km.inertia_)
    
plt.plot(range(1,20), distortions, marker='o')
plt.xlabel('No. of Clusters')
plt.ylabel('Within Cluster Sum of Squares')
plt.show()

Run KMeans with 4 clusters

In [119]:
sns.set(rc={'figure.figsize':(15,8)})
from sklearn.cluster import KMeans
kmeans = KMeans(n_clusters=4)
# Fit the data
kmeans.fit(newcounty_df_pt)
# Get the cluster labels
y_pred = kmeans.predict(newcounty_df_pt)
# plot the cluster assignments and cluster centers
# newstate_df_std[:,0] includes all values for Provider Count and so on... #103 is MEDAGE_CY
plt.scatter(newcounty_df_pt[:, 0], newcounty_df_pt[:,103], c=y_pred, cmap="plasma")
plt.scatter(kmeans.cluster_centers_[:, 0],   
            kmeans.cluster_centers_[:, 103],
            marker='^', 
            c=[0,1,2,3], 
            s=100, 
            linewidth=2,
            cmap="plasma")
plt.xlabel("Feature 0")
plt.ylabel("Feature 1")
Out[119]:
Text(0, 0.5, 'Feature 1')
In [120]:
kmeans.cluster_centers_
Out[120]:
array([[-2.29317364e-01, -1.64233279e-01, -2.43219407e-01,
        -2.42675763e-01, -2.42411870e-01, -2.58458545e-01,
        -1.25736786e-01, -1.29842473e-01, -1.27814032e-01,
        -6.32433407e-03, -1.64233279e-01, -1.63502697e-01,
        -1.64971132e-01, -2.43841359e-01, -1.71135994e-01,
        -1.09379498e-01, -7.08485772e-02, -1.78882907e-01,
        -1.20255165e-01, -1.61501958e-01, -2.42271740e-01,
        -2.39829177e-01, -2.01811386e-01, -2.01811386e-01,
        -1.99028814e-01, -2.04901056e-01, -2.35039704e-01,
        -2.34328504e-01, -2.35124412e-01, -2.39545162e-01,
        -2.30936558e-01, -2.27053923e-01, -2.30186600e-01,
        -2.34011637e-01, -2.21017499e-01, -2.34349625e-01,
        -2.19176247e-01, -2.22922791e-01, -2.28501614e-01,
        -2.31508456e-01, -2.33838305e-01, -2.37733664e-01,
        -2.41251929e-01, -2.31321995e-01, -2.42318230e-01,
        -2.42974090e-01, -2.41937937e-01, -2.40292975e-01,
        -2.40814927e-01, -2.43466068e-01, -2.33709587e-01,
        -2.47446180e-01, -2.25527482e-01, -2.32809623e-01,
        -2.32589872e-01, -2.30871750e-01, -2.43967347e-01,
        -1.59092857e-01, -2.32628181e-01, -2.16968477e-01,
        -2.44474646e-01, -2.23260653e-01, -2.30636951e-01,
        -2.34340471e-01, -2.38507791e-01, -2.45285761e-01,
        -2.41071102e-01, -1.76294818e-01, -1.45324887e-01,
        -1.59092857e-01, -1.53467221e-01, -2.34326215e-01,
        -1.58466181e-01, -1.59661881e-01, -1.27814032e-01,
        -6.36804859e-03, -2.31849228e-01, -2.32207043e-01,
        -2.26959236e-01, -2.28578630e-01, -2.18881238e-01,
        -2.18532889e-01, -2.20635024e-01, -2.25261640e-01,
        -2.29207308e-01, -2.32103140e-01, -2.36036632e-01,
        -2.40570229e-01, -2.30933444e-01, -2.42256405e-01,
        -2.44170012e-01, -2.43300353e-01, -2.40061138e-01,
        -2.38785309e-01, -2.36920079e-01, -2.31823618e-01,
        -2.32954494e-01, -2.38701971e-01,  4.66452208e-02,
        -1.51163422e-01,  4.59806691e-02,  6.92172601e-02,
        -1.49514500e-01,  4.82673939e-02, -8.00094652e-02,
        -1.59732505e-01, -2.21450216e-01, -1.91147282e-01,
        -2.12216304e-01, -2.10444754e-01, -2.18099725e-01,
        -7.99587097e-02, -1.64159154e-01, -1.99943896e-01,
        -2.29677993e-01, -2.68676366e-01, -1.58374936e-01,
        -2.58037228e-01, -1.46986206e-01, -2.41282616e-01,
        -1.45769912e-01, -1.46986206e-01, -2.57895189e-01,
        -1.58427906e-01, -2.27007470e-01, -2.29387704e-01,
        -2.33001578e-01, -2.20032660e-01, -2.33352807e-01,
        -2.18896430e-01, -2.21811229e-01, -2.26915755e-01,
        -2.30404339e-01, -2.33013688e-01, -2.36933736e-01,
        -2.40961563e-01, -2.31125896e-01, -2.42334198e-01,
        -2.43582614e-01, -2.42636978e-01, -2.40297932e-01,
        -2.40132653e-01, -2.41402648e-01, -1.10083858e-01,
        -2.11376777e-01, -2.32809623e-01, -2.11037184e-01,
        -2.32599146e-01, -1.97609564e-01, -2.41070897e-01,
        -2.41160205e-01, -2.32809623e-01, -9.25778130e-04,
        -2.26430209e-01, -2.13653291e-01, -2.49746142e-01,
        -2.49746142e-01, -2.51066185e-01, -2.48346659e-01,
        -2.35912390e-01],
       [ 4.80078360e+00,  4.05313502e+00,  4.96050868e+00,
         4.92235367e+00,  4.92231503e+00,  4.42351752e+00,
         3.01412455e+00,  3.08982775e+00,  3.05279888e+00,
         7.91286005e-01,  4.05313502e+00,  4.02397084e+00,
         4.08361504e+00,  4.97095309e+00,  1.13930456e+00,
         1.48409904e+00,  9.48205317e-01,  1.20786161e+00,
         1.37658143e-01,  1.94037786e+00,  4.90037605e+00,
         4.82721802e+00,  4.52443696e+00,  4.52443696e+00,
         4.47652784e+00,  4.57676180e+00,  4.93072654e+00,
         4.95987578e+00,  4.91430101e+00,  4.98155721e+00,
         4.92847786e+00,  5.01871898e+00,  4.83205338e+00,
         4.94921046e+00,  4.82935806e+00,  4.95774237e+00,
         5.02079667e+00,  5.03509687e+00,  5.01708829e+00,
         4.98059210e+00,  4.91921200e+00,  4.87664896e+00,
         4.88265879e+00,  4.99709477e+00,  4.90522364e+00,
         4.92157941e+00,  4.90043702e+00,  4.84794858e+00,
         4.76631608e+00,  4.63332209e+00,  4.96209509e+00,
         5.45100522e+00,  5.02436112e+00,  4.95760606e+00,
         4.94241937e+00,  4.93833747e+00,  4.88810006e+00,
         4.36902434e+00,  4.96333273e+00,  4.87351440e+00,
         4.74859359e+00,  4.87610819e+00,  5.02987544e+00,
         5.03084203e+00,  5.02639892e+00,  5.01627438e+00,
         5.03379061e+00,  4.34797747e+00,  3.72600120e+00,
         4.36902434e+00,  4.49838089e+00,  4.87897419e+00,
         4.36501350e+00,  4.37142110e+00,  3.05279888e+00,
         7.99255101e-01,  4.94071160e+00,  4.94874408e+00,
         5.01360982e+00,  4.82137327e+00,  4.79916115e+00,
         4.99411997e+00,  5.01408540e+00,  4.99415068e+00,
         4.97131179e+00,  4.92444096e+00,  4.88273133e+00,
         4.87778884e+00,  4.98583071e+00,  4.88554413e+00,
         4.90280643e+00,  4.88878508e+00,  4.83792822e+00,
         4.73554875e+00,  4.57709902e+00,  4.95180809e+00,
         4.94277883e+00,  4.96899600e+00, -7.09243260e-01,
         9.16802203e-01, -7.20309943e-01, -9.29561859e-01,
         8.17387185e-01, -6.97657487e-01, -2.84475846e-01,
         1.94066936e+00,  4.96903290e+00,  4.83081361e+00,
         4.65632964e+00,  4.64165221e+00,  4.77766322e+00,
         1.83493927e+00,  4.05172448e+00,  4.46547213e+00,
         4.64667349e+00,  4.46985252e+00,  4.04283823e+00,
         4.88162711e+00,  3.75522902e+00,  4.78142782e+00,
         3.73672192e+00,  3.75522902e+00,  4.89029611e+00,
         9.51091475e-01,  5.01615518e+00,  4.82711959e+00,
         4.94592142e+00,  4.81617528e+00,  4.95423889e+00,
         5.00834727e+00,  5.02543350e+00,  5.00648423e+00,
         4.97676747e+00,  4.92250022e+00,  4.88031515e+00,
         4.88108246e+00,  4.99139497e+00,  4.89686185e+00,
         4.91411043e+00,  4.89690982e+00,  4.84571131e+00,
         4.75674826e+00,  4.61894258e+00,  3.03313609e+00,
         4.64981399e+00,  4.95760606e+00,  4.95506435e+00,
         4.92450370e+00,  4.81818724e+00,  5.03378089e+00,
         5.08311303e+00,  4.95760606e+00,  2.45689242e-01,
         5.08008604e+00,  4.98874827e+00,  4.91858407e+00,
         4.91858407e+00,  4.91349190e+00,  4.92275350e+00,
         4.83857696e+00],
       [ 1.67155862e+01,  2.25017391e+01,  1.82355479e+01,
         1.81634556e+01,  1.82048849e+01,  1.54887938e+01,
         1.09780613e+01,  1.20059274e+01,  1.14871195e+01,
         1.24592475e+00,  2.25017391e+01,  2.27937310e+01,
         2.21707257e+01,  1.78202715e+01,  1.22454020e+00,
         2.62404528e+00,  2.01345162e+00,  1.29423189e+00,
         5.15097380e-02,  3.59070605e+00,  1.88707660e+01,
         1.85001059e+01,  9.52587163e+00,  9.52587163e+00,
         9.35163714e+00,  9.72191876e+00,  1.95124195e+01,
         1.95607998e+01,  1.96286414e+01,  1.87632756e+01,
         1.98101980e+01,  1.90537962e+01,  1.99868122e+01,
         1.95818945e+01,  2.04642611e+01,  1.95318088e+01,
         2.02046032e+01,  1.99742698e+01,  1.96755275e+01,
         1.96898775e+01,  1.98455034e+01,  1.96329742e+01,
         1.91321957e+01,  1.89143994e+01,  1.87850701e+01,
         1.84555995e+01,  1.83570224e+01,  1.83629915e+01,
         1.80478946e+01,  1.75499070e+01,  1.95241910e+01,
         1.23242663e+01,  1.91249716e+01,  1.96244578e+01,
         1.98475196e+01,  1.93745517e+01,  1.60186536e+01,
         2.39118269e+01,  1.96221773e+01,  1.79167059e+01,
         1.76460726e+01,  1.86261285e+01,  1.75381284e+01,
         1.75613734e+01,  1.78828441e+01,  1.75569008e+01,
         1.81973716e+01,  2.39463529e+01,  2.64631680e+01,
         2.39118269e+01,  2.06028030e+01,  1.86027591e+01,
         2.38906796e+01,  2.39241384e+01,  1.14871195e+01,
         1.26017972e+00,  1.98210134e+01,  1.97781317e+01,
         1.91169007e+01,  2.01531888e+01,  2.06388334e+01,
         2.03290953e+01,  2.01543956e+01,  1.99674684e+01,
         1.98953526e+01,  2.00099612e+01,  1.98430700e+01,
         1.92982694e+01,  1.90228065e+01,  1.89066199e+01,
         1.83958068e+01,  1.82318225e+01,  1.84264017e+01,
         1.83006259e+01,  1.83230097e+01,  1.97237523e+01,
         1.97170930e+01,  1.89579112e+01, -8.50146499e-01,
         8.90420073e-01, -8.45998824e-01, -8.89347617e-01,
         6.77475274e-01, -8.39798851e-01, -7.39841991e-01,
         3.34823689e+00,  2.02528974e+01,  2.23864877e+01,
         2.15556298e+01,  2.15726551e+01,  2.11310606e+01,
         3.52837169e+00,  2.24384965e+01,  9.38158416e+00,
         1.82896494e+01,  1.23216349e+01,  2.59655994e+01,
         1.51882793e+01,  2.64096155e+01,  1.82146407e+01,
         2.64962908e+01,  2.64096155e+01,  1.53228599e+01,
         5.48135978e-01,  1.90861038e+01,  2.00744134e+01,
         1.97012668e+01,  2.05614215e+01,  1.96543955e+01,
         2.02717859e+01,  2.00686397e+01,  1.98258036e+01,
         1.97947319e+01,  1.99296598e+01,  1.97388514e+01,
         1.92152144e+01,  1.89698398e+01,  1.88458527e+01,
         1.84324735e+01,  1.83070597e+01,  1.83988591e+01,
         1.81662124e+01,  1.78544947e+01,  7.32630057e-01,
         2.15672794e+01,  1.96244578e+01,  2.05241422e+01,
         1.87125765e+01,  2.20615458e+01,  1.81974760e+01,
         1.77596149e+01,  1.96244578e+01, -1.57011303e-01,
         1.68183164e+01,  1.11872632e+01,  1.67788181e+01,
         1.67788181e+01,  1.65988761e+01,  1.69589683e+01,
         1.87377110e+01],
       [ 1.05388157e+00,  5.79175679e-01,  1.13286987e+00,
         1.13455348e+00,  1.13204465e+00,  1.35953914e+00,
         5.07240115e-01,  5.21685231e-01,  5.14583282e-01,
        -7.37388110e-02,  5.79175679e-01,  5.75040906e-01,
         5.83495145e-01,  1.13985002e+00,  1.23553668e+00,
         6.64084250e-01,  4.29513484e-01,  1.28886512e+00,
         9.71785664e-01,  1.01956894e+00,  1.12868522e+00,
         1.12224865e+00,  9.25795287e-01,  9.25795287e-01,
         9.11261038e-01,  9.42040168e-01,  1.05934799e+00,
         1.04882006e+00,  1.06150585e+00,  1.09517914e+00,
         1.02339681e+00,  9.84300766e-01,  1.02988313e+00,
         1.04759455e+00,  9.50732154e-01,  1.04954226e+00,
         9.09633716e-01,  9.40330238e-01,  9.91431072e-01,
         1.02146787e+00,  1.04841106e+00,  1.08851231e+00,
         1.12073703e+00,  1.02381886e+00,  1.12905616e+00,
         1.13475343e+00,  1.13009851e+00,  1.12415694e+00,
         1.14297209e+00,  1.18836061e+00,  1.04368560e+00,
         1.14402856e+00,  9.70300181e-01,  1.03610082e+00,
         1.03469636e+00,  1.02496098e+00,  1.16766181e+00,
         4.79064914e-01,  1.03378404e+00,  9.31569422e-01,
         1.17903259e+00,  9.77345419e-01,  1.02455788e+00,
         1.05478901e+00,  1.08721450e+00,  1.14727811e+00,
         1.10472817e+00,  6.23815392e-01,  4.38809521e-01,
         4.79064914e-01,  4.40614395e-01,  1.06842938e+00,
         4.74652448e-01,  4.83309680e-01,  5.14583282e-01,
        -7.46601807e-02,  1.02904995e+00,  1.03117580e+00,
         9.83754046e-01,  1.01682441e+00,  9.36103430e-01,
         9.07216489e-01,  9.23061922e-01,  9.65677915e-01,
         1.00216628e+00,  1.03199016e+00,  1.07191014e+00,
         1.11447409e+00,  1.02137956e+00,  1.13043770e+00,
         1.14785561e+00,  1.14406426e+00,  1.12319468e+00,
         1.12867142e+00,  1.13628527e+00,  1.02800548e+00,
         1.03871301e+00,  1.08847692e+00, -2.74214423e-01,
         1.10600011e+00, -2.67144726e-01, -4.27919170e-01,
         1.10867295e+00, -2.89380254e-01,  7.07886296e-01,
         1.00689599e+00,  9.35581133e-01,  6.88401291e-01,
         8.94552723e-01,  8.81943335e-01,  9.28798554e-01,
         3.62608225e-01,  5.79284587e-01,  9.20186762e-01,
         1.06661293e+00,  1.46282546e+00,  5.04177825e-01,
         1.29146520e+00,  4.48676925e-01,  1.14326434e+00,
         4.40643704e-01,  4.48676925e-01,  1.28793030e+00,
         1.16371172e+00,  9.84029960e-01,  1.02330043e+00,
         1.03877032e+00,  9.43744497e-01,  1.04083255e+00,
         9.08600320e-01,  9.31804507e-01,  9.78674570e-01,
         1.01206388e+00,  1.04044089e+00,  1.08051396e+00,
         1.11789665e+00,  1.02258402e+00,  1.12991744e+00,
         1.14105604e+00,  1.13678940e+00,  1.12423365e+00,
         1.13778017e+00,  1.17096119e+00,  4.58585659e-01,
         8.88483719e-01,  1.03610082e+00,  8.49491389e-01,
         1.04662187e+00,  7.46217812e-01,  1.10472706e+00,
         1.10180454e+00,  1.03610082e+00, -2.70384574e-02,
         9.88347940e-01,  9.42059826e-01,  1.20470734e+00,
         1.20470734e+00,  1.21780852e+00,  1.19108396e+00,
         1.08633317e+00]])

Identify which counties belong to what cluster

In [122]:
# Create dataframe of Cluster labels and State Names
clusterdf = pd.DataFrame(kmeans.labels_, test_newcounty_df['subregion'])
clusterdf.reset_index(inplace=True)
clusterdf.columns = ['County','Cluster']
clusterdf.head()
Out[122]:
County Cluster
0 Los Angeles County 2
1 Cook County 1
2 New York County 1
3 Harris County 1
4 Maricopa County 1
In [123]:
# Count of counties in each cluster
clusterdf['Cluster'].value_counts()
Out[123]:
0    1015
3     123
1      18
2       1
Name: Cluster, dtype: int64
In [124]:
# Counties in each cluster
clusterdf.groupby('Cluster')['County'].apply(list)
Out[124]:
Cluster
0    [Lehigh County, Washtenaw County, Pulaski Coun...
1    [Cook County, New York County, Harris County, ...
2                                 [Los Angeles County]
3    [Philadelphia County, Oakland County, Fulton C...
Name: County, dtype: object
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 

Test 2 - OBGYN Providers

DF for OBGYN Providers by State

In [33]:
# Get provider data for obgyn providers only

obgyn_count_df.head()
Out[33]:
regionabbr Provider_Count
0 CA 7543
1 TX 5161
2 NY 5054
3 FL 4170
4 PA 3283

Create df for Data from State Layer

In [144]:
allstate_featureset = state_layer.query()
allstate_df = allstate_featureset.sdf
allstate_df.head()
Error invoking service
Error generating token
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-144-a9c8dabe6cbf> in <module>
----> 1 allstate_featureset = state_layer.query()
      2 allstate_df = allstate_featureset.sdf
      3 allstate_df.head()

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\features\layer.py in query(self, where, out_fields, time_filter, geometry_filter, return_geometry, return_count_only, return_ids_only, return_distinct_values, return_extent_only, group_by_fields_for_statistics, statistic_filter, result_offset, result_record_count, object_ids, distance, units, max_allowable_offset, out_sr, geometry_precision, gdb_version, order_by_fields, out_statistics, return_z, return_m, multipatch_option, quantization_parameters, return_centroid, return_all_records, result_type, historic_moment, sql_format, return_true_curves, return_exceeded_limit_features, as_df, **kwargs)
    698 
    699         params['returnCountOnly'] = True
--> 700         record_count = self._query(url, params, raw=as_raw)
    701         if 'maxRecordCount' in self.properties:
    702             max_records = self.properties['maxRecordCount']

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\features\layer.py in _query(self, url, params, raw)
   1397         """ returns results of query """
   1398         result = self._con.post(path=url,
-> 1399                                 postdata=params, token=self._token)
   1400         if 'error' in result:
   1401             raise ValueError(result)

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\_impl\connection.py in post(self, path, postdata, files, ssl, compress, is_retry, use_ordered_dict, add_token, verify_cert, token, try_json, out_folder, file_name, force_bytes, add_headers)
   1175                                          verify_cert=verify_cert, is_retry=True)
   1176 
-> 1177                 self._handle_json_error(resp_json['error'], errorcode)
   1178                 return None
   1179 

~\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\arcgis\_impl\connection.py in _handle_json_error(self, error, errorcode)
   1196 
   1197         errormessage = errormessage + "\n(Error Code: " + str(errorcode) +")"
-> 1198         raise RuntimeError(errormessage)
   1199 
   1200 class _StrictURLopener(request.FancyURLopener):

RuntimeError: Error invoking service
Error generating token
(Error Code: 500)
In [42]:
for field in state_layer.properties.fields:
#     print(field)
    print(field['name'], '\t', field['alias'])
#     print(field[0])
OBJECTID 	 OBJECTID
Shape 	 Shape
ID 	 ID
NAME 	 NAME
STATE_NAME 	 STATE_NAME
ST_ABBREV 	 ST_ABBREV
AREA 	 Area in Square Miles (Calculated)
TOTPOP_CY 	 2018 Total Population (Esri)
HHPOP_CY 	 2018 Household Population (Esri)
FAMPOP_CY 	 2018 Family Population (Esri)
GQPOP_CY 	 2018 Group Quarters Population (Esri)
POPDENS_CY 	 2018 Population Density (Pop per Square Mile) (Esri)
TOTHH_CY 	 2018 Total Households (Esri)
AVGHHSZ_CY 	 2018 Average Household Size (Esri)
FAMHH_CY 	 2018 Total Family Households (Esri)
AVGFMSZ_CY 	 2018 Average Family Size (Esri)
TOTHU_CY 	 2018 Total Housing Units (Esri)
OWNER_CY 	 2018 Owner Occupied Housing Units (Esri)
RENTER_CY 	 2018 Renter Occupied Housing Units (Esri)
VACANT_CY 	 2018 Vacant Housing Units (Esri)
POPGRW10CY 	 2010-2018 Population: Annual Growth Rate (Esri)
HHGRW10CY 	 2010-2018 Households: Annual Growth Rate (Esri)
FAMGRW10CY 	 2010-2018 Families: Annual Growth Rate (Esri)
GENALPHACY 	 2018 Generation Alpha Population (Born 2017 or Later)
GENZ_CY 	 2018 Generation Z Population (Born 1999 to 2016)
MILLENN_CY 	 2018 Millennial Population (Born 1981 to 1998)
GENX_CY 	 2018 Generation X Population (Born 1965 to 1980)
BABYBOOMCY 	 2018 Baby Boomer Population (Born 1946 to 1964)
OLDRGENSCY 	 2018 Silent & Greatest Generations Population (Born 1945/Earlier)
GENBASE_CY 	 2018 Population by Generation Base
POP0_CY 	 2018 Total Population Age 0-4 (Esri)
POP5_CY 	 2018 Total Population Age 5-9 (Esri)
POP10_CY 	 2018 Total Population Age 10-14 (Esri)
POP15_CY 	 2018 Total Population Age 15-19 (Esri)
POP20_CY 	 2018 Total Population Age 20-24 (Esri)
POP25_CY 	 2018 Total Population Age 25-29 (Esri)
POP30_CY 	 2018 Total Population Age 30-34 (Esri)
POP35_CY 	 2018 Total Population Age 35-39 (Esri)
POP40_CY 	 2018 Total Population Age 40-44 (Esri)
POP45_CY 	 2018 Total Population Age 45-49 (Esri)
POP50_CY 	 2018 Total Population Age 50-54 (Esri)
POP55_CY 	 2018 Total Population Age 55-59 (Esri)
POP60_CY 	 2018 Total Population Age 60-64 (Esri)
POP65_CY 	 2018 Total Population Age 65-69 (Esri)
POP70_CY 	 2018 Total Population Age 70-74 (Esri)
POP75_CY 	 2018 Total Population Age 75-79 (Esri)
POP80_CY 	 2018 Total Population Age 80-84 (Esri)
POP85_CY 	 2018 Total Population Age 85+ (Esri)
POP18UP_CY 	 2018 Total Population Age 18+ (Esri)
POP21UP_CY 	 2018 Total Population Age 21+ (Esri)
MEDAGE_CY 	 2018 Median Age (Esri)
MALES_CY 	 2018 Male Population (Esri)
MALE0_CY 	 2018 Male Population Age 0-4 (Esri)
MALE5_CY 	 2018 Male Population Age 5-9 (Esri)
MALE10_CY 	 2018 Male Population Age 10-14 (Esri)
MALE15_CY 	 2018 Male Population Age 15-19 (Esri)
MALE20_CY 	 2018 Male Population Age 20-24 (Esri)
MALE25_CY 	 2018 Male Population Age 25-29 (Esri)
MALE30_CY 	 2018 Male Population Age 30-34 (Esri)
MALE35_CY 	 2018 Male Population Age 35-39 (Esri)
MALE40_CY 	 2018 Male Population Age 40-44 (Esri)
MALE45_CY 	 2018 Male Population Age 45-49 (Esri)
MALE50_CY 	 2018 Male Population Age 50-54 (Esri)
MALE55_CY 	 2018 Male Population Age 55-59 (Esri)
MALE60_CY 	 2018 Male Population Age 60-64 (Esri)
MALE65_CY 	 2018 Male Population Age 65-69 (Esri)
MALE70_CY 	 2018 Male Population Age 70-74 (Esri)
MALE75_CY 	 2018 Male Population Age 75-79 (Esri)
MALE80_CY 	 2018 Male Population Age 80-84 (Esri)
MALE85_CY 	 2018 Male Population Age 85+ (Esri)
MAL18UP_CY 	 2018 Male Population Age 18+ (Esri)
MAL21UP_CY 	 2018 Male Population Age 21+ (Esri)
MEDMAGE_CY 	 2018 Median Male Age (Esri)
FEMALES_CY 	 2018 Female Population (Esri)
FEM0_CY 	 2018 Female Population Age 0-4 (Esri)
FEM5_CY 	 2018 Female Population Age 5-9 (Esri)
FEM10_CY 	 2018 Female Population Age 10-14 (Esri)
FEM15_CY 	 2018 Female Population Age 15-19 (Esri)
FEM20_CY 	 2018 Female Population Age 20-24 (Esri)
FEM25_CY 	 2018 Female Population Age 25-29 (Esri)
FEM30_CY 	 2018 Female Population Age 30-34 (Esri)
FEM35_CY 	 2018 Female Population Age 35-39 (Esri)
FEM40_CY 	 2018 Female Population Age 40-44 (Esri)
FEM45_CY 	 2018 Female Population Age 45-49 (Esri)
FEM50_CY 	 2018 Female Population Age 50-54 (Esri)
FEM55_CY 	 2018 Female Population Age 55-59 (Esri)
FEM60_CY 	 2018 Female Population Age 60-64 (Esri)
FEM65_CY 	 2018 Female Population Age 65-69 (Esri)
FEM70_CY 	 2018 Female Population Age 70-74 (Esri)
FEM75_CY 	 2018 Female Population Age 75-79 (Esri)
FEM80_CY 	 2018 Female Population Age 80-84 (Esri)
FEM85_CY 	 2018 Female Population Age 85+ (Esri)
FEM18UP_CY 	 2018 Female Population Age 18+ (Esri)
FEM21UP_CY 	 2018 Female Population Age 21+ (Esri)
MEDFAGE_CY 	 2018 Median Female Age (Esri)
AGEBASE_CY 	 2018 Total Population by Five-Year Age Base (Esri)
AGE0_CY 	 2018 Total Population Age <1 (Esri)
AGE1_CY 	 2018 Total Population Age 1 (Esri)
AGE2_CY 	 2018 Total Population Age 2 (Esri)
AGE3_CY 	 2018 Total Population Age 3 (Esri)
AGE4_CY 	 2018 Total Population Age 4 (Esri)
AGE5_CY 	 2018 Total Population Age 5 (Esri)
AGE6_CY 	 2018 Total Population Age 6 (Esri)
AGE7_CY 	 2018 Total Population Age 7 (Esri)
AGE8_CY 	 2018 Total Population Age 8 (Esri)
AGE9_CY 	 2018 Total Population Age 9 (Esri)
AGE10_CY 	 2018 Total Population Age 10 (Esri)
AGE11_CY 	 2018 Total Population Age 11 (Esri)
AGE12_CY 	 2018 Total Population Age 12 (Esri)
AGE13_CY 	 2018 Total Population Age 13 (Esri)
AGE14_CY 	 2018 Total Population Age 14 (Esri)
AGE15_CY 	 2018 Total Population Age 15 (Esri)
AGE16_CY 	 2018 Total Population Age 16 (Esri)
AGE17_CY 	 2018 Total Population Age 17 (Esri)
AGE18_CY 	 2018 Total Population Age 18 (Esri)
AGE19_CY 	 2018 Total Population Age 19 (Esri)
AGE20_CY 	 2018 Total Population Age 20 (Esri)
AGE21_CY 	 2018 Total Population Age 21 (Esri)
AGE22_CY 	 2018 Total Population Age 22 (Esri)
AGE23_CY 	 2018 Total Population Age 23 (Esri)
AGE24_CY 	 2018 Total Population Age 24 (Esri)
AGE25_CY 	 2018 Total Population Age 25 (Esri)
AGE26_CY 	 2018 Total Population Age 26 (Esri)
AGE27_CY 	 2018 Total Population Age 27 (Esri)
AGE28_CY 	 2018 Total Population Age 28 (Esri)
AGE29_CY 	 2018 Total Population Age 29 (Esri)
AGE30_CY 	 2018 Total Population Age 30 (Esri)
AGE31_CY 	 2018 Total Population Age 31 (Esri)
AGE32_CY 	 2018 Total Population Age 32 (Esri)
AGE33_CY 	 2018 Total Population Age 33 (Esri)
AGE34_CY 	 2018 Total Population Age 34 (Esri)
AGE35_CY 	 2018 Total Population Age 35 (Esri)
AGE36_CY 	 2018 Total Population Age 36 (Esri)
AGE37_CY 	 2018 Total Population Age 37 (Esri)
AGE38_CY 	 2018 Total Population Age 38 (Esri)
AGE39_CY 	 2018 Total Population Age 39 (Esri)
AGE40_CY 	 2018 Total Population Age 40 (Esri)
AGE41_CY 	 2018 Total Population Age 41 (Esri)
AGE42_CY 	 2018 Total Population Age 42 (Esri)
AGE43_CY 	 2018 Total Population Age 43 (Esri)
AGE44_CY 	 2018 Total Population Age 44 (Esri)
AGE45_CY 	 2018 Total Population Age 45 (Esri)
AGE46_CY 	 2018 Total Population Age 46 (Esri)
AGE47_CY 	 2018 Total Population Age 47 (Esri)
AGE48_CY 	 2018 Total Population Age 48 (Esri)
AGE49_CY 	 2018 Total Population Age 49 (Esri)
AGE50_CY 	 2018 Total Population Age 50 (Esri)
AGE51_CY 	 2018 Total Population Age 51 (Esri)
AGE52_CY 	 2018 Total Population Age 52 (Esri)
AGE53_CY 	 2018 Total Population Age 53 (Esri)
AGE54_CY 	 2018 Total Population Age 54 (Esri)
AGE55_CY 	 2018 Total Population Age 55 (Esri)
AGE56_CY 	 2018 Total Population Age 56 (Esri)
AGE57_CY 	 2018 Total Population Age 57 (Esri)
AGE58_CY 	 2018 Total Population Age 58 (Esri)
AGE59_CY 	 2018 Total Population Age 59 (Esri)
AGE60_CY 	 2018 Total Population Age 60 (Esri)
AGE61_CY 	 2018 Total Population Age 61 (Esri)
AGE62_CY 	 2018 Total Population Age 62 (Esri)
AGE63_CY 	 2018 Total Population Age 63 (Esri)
AGE64_CY 	 2018 Total Population Age 64 (Esri)
AGE65_CY 	 2018 Total Population Age 65 (Esri)
AGE66_CY 	 2018 Total Population Age 66 (Esri)
AGE67_CY 	 2018 Total Population Age 67 (Esri)
AGE68_CY 	 2018 Total Population Age 68 (Esri)
AGE69_CY 	 2018 Total Population Age 69 (Esri)
AGE70_CY 	 2018 Total Population Age 70 (Esri)
AGE71_CY 	 2018 Total Population Age 71 (Esri)
AGE72_CY 	 2018 Total Population Age 72 (Esri)
AGE73_CY 	 2018 Total Population Age 73 (Esri)
AGE74_CY 	 2018 Total Population Age 74 (Esri)
AGE75_CY 	 2018 Total Population Age 75 (Esri)
AGE76_CY 	 2018 Total Population Age 76 (Esri)
AGE77_CY 	 2018 Total Population Age 77 (Esri)
AGE78_CY 	 2018 Total Population Age 78 (Esri)
AGE79_CY 	 2018 Total Population Age 79 (Esri)
AGE80_CY 	 2018 Total Population Age 80 (Esri)
AGE81_CY 	 2018 Total Population Age 81 (Esri)
AGE82_CY 	 2018 Total Population Age 82 (Esri)
AGE83_CY 	 2018 Total Population Age 83 (Esri)
AGE84_CY 	 2018 Total Population Age 84 (Esri)
MAGE0_CY 	 2018 Male Population Age <1 (Esri)
MAGE1_CY 	 2018 Male Population Age 1 (Esri)
MAGE2_CY 	 2018 Male Population Age 2 (Esri)
MAGE3_CY 	 2018 Male Population Age 3 (Esri)
MAGE4_CY 	 2018 Male Population Age 4 (Esri)
MAGE5_CY 	 2018 Male Population Age 5 (Esri)
MAGE6_CY 	 2018 Male Population Age 6 (Esri)
MAGE7_CY 	 2018 Male Population Age 7 (Esri)
MAGE8_CY 	 2018 Male Population Age 8 (Esri)
MAGE9_CY 	 2018 Male Population Age 9 (Esri)
MAGE10_CY 	 2018 Male Population Age 10 (Esri)
MAGE11_CY 	 2018 Male Population Age 11 (Esri)
MAGE12_CY 	 2018 Male Population Age 12 (Esri)
MAGE13_CY 	 2018 Male Population Age 13 (Esri)
MAGE14_CY 	 2018 Male Population Age 14 (Esri)
MAGE15_CY 	 2018 Male Population Age 15 (Esri)
MAGE16_CY 	 2018 Male Population Age 16 (Esri)
MAGE17_CY 	 2018 Male Population Age 17 (Esri)
MAGE18_CY 	 2018 Male Population Age 18 (Esri)
MAGE19_CY 	 2018 Male Population Age 19 (Esri)
MAGE20_CY 	 2018 Male Population Age 20 (Esri)
MAGE21_CY 	 2018 Male Population Age 21 (Esri)
MAGE22_CY 	 2018 Male Population Age 22 (Esri)
MAGE23_CY 	 2018 Male Population Age 23 (Esri)
MAGE24_CY 	 2018 Male Population Age 24 (Esri)
MAGE25_CY 	 2018 Male Population Age 25 (Esri)
MAGE26_CY 	 2018 Male Population Age 26 (Esri)
MAGE27_CY 	 2018 Male Population Age 27 (Esri)
MAGE28_CY 	 2018 Male Population Age 28 (Esri)
MAGE29_CY 	 2018 Male Population Age 29 (Esri)
MAGE30_CY 	 2018 Male Population Age 30 (Esri)
MAGE31_CY 	 2018 Male Population Age 31 (Esri)
MAGE32_CY 	 2018 Male Population Age 32 (Esri)
MAGE33_CY 	 2018 Male Population Age 33 (Esri)
MAGE34_CY 	 2018 Male Population Age 34 (Esri)
MAGE35_CY 	 2018 Male Population Age 35 (Esri)
MAGE36_CY 	 2018 Male Population Age 36 (Esri)
MAGE37_CY 	 2018 Male Population Age 37 (Esri)
MAGE38_CY 	 2018 Male Population Age 38 (Esri)
MAGE39_CY 	 2018 Male Population Age 39 (Esri)
MAGE40_CY 	 2018 Male Population Age 40 (Esri)
MAGE41_CY 	 2018 Male Population Age 41 (Esri)
MAGE42_CY 	 2018 Male Population Age 42 (Esri)
MAGE43_CY 	 2018 Male Population Age 43 (Esri)
MAGE44_CY 	 2018 Male Population Age 44 (Esri)
MAGE45_CY 	 2018 Male Population Age 45 (Esri)
MAGE46_CY 	 2018 Male Population Age 46 (Esri)
MAGE47_CY 	 2018 Male Population Age 47 (Esri)
MAGE48_CY 	 2018 Male Population Age 48 (Esri)
MAGE49_CY 	 2018 Male Population Age 49 (Esri)
MAGE50_CY 	 2018 Male Population Age 50 (Esri)
MAGE51_CY 	 2018 Male Population Age 51 (Esri)
MAGE52_CY 	 2018 Male Population Age 52 (Esri)
MAGE53_CY 	 2018 Male Population Age 53 (Esri)
MAGE54_CY 	 2018 Male Population Age 54 (Esri)
MAGE55_CY 	 2018 Male Population Age 55 (Esri)
MAGE56_CY 	 2018 Male Population Age 56 (Esri)
MAGE57_CY 	 2018 Male Population Age 57 (Esri)
MAGE58_CY 	 2018 Male Population Age 58 (Esri)
MAGE59_CY 	 2018 Male Population Age 59 (Esri)
MAGE60_CY 	 2018 Male Population Age 60 (Esri)
MAGE61_CY 	 2018 Male Population Age 61 (Esri)
MAGE62_CY 	 2018 Male Population Age 62 (Esri)
MAGE63_CY 	 2018 Male Population Age 63 (Esri)
MAGE64_CY 	 2018 Male Population Age 64 (Esri)
MAGE65_CY 	 2018 Male Population Age 65 (Esri)
MAGE66_CY 	 2018 Male Population Age 66 (Esri)
MAGE67_CY 	 2018 Male Population Age 67 (Esri)
MAGE68_CY 	 2018 Male Population Age 68 (Esri)
MAGE69_CY 	 2018 Male Population Age 69 (Esri)
MAGE70_CY 	 2018 Male Population Age 70 (Esri)
MAGE71_CY 	 2018 Male Population Age 71 (Esri)
MAGE72_CY 	 2018 Male Population Age 72 (Esri)
MAGE73_CY 	 2018 Male Population Age 73 (Esri)
MAGE74_CY 	 2018 Male Population Age 74 (Esri)
MAGE75_CY 	 2018 Male Population Age 75 (Esri)
MAGE76_CY 	 2018 Male Population Age 76 (Esri)
MAGE77_CY 	 2018 Male Population Age 77 (Esri)
MAGE78_CY 	 2018 Male Population Age 78 (Esri)
MAGE79_CY 	 2018 Male Population Age 79 (Esri)
MAGE80_CY 	 2018 Male Population Age 80 (Esri)
MAGE81_CY 	 2018 Male Population Age 81 (Esri)
MAGE82_CY 	 2018 Male Population Age 82 (Esri)
MAGE83_CY 	 2018 Male Population Age 83 (Esri)
MAGE84_CY 	 2018 Male Population Age 84 (Esri)
FAGE0_CY 	 2018 Female Population Age <1 (Esri)
FAGE1_CY 	 2018 Female Population Age 1 (Esri)
FAGE2_CY 	 2018 Female Population Age 2 (Esri)
FAGE3_CY 	 2018 Female Population Age 3 (Esri)
FAGE4_CY 	 2018 Female Population Age 4 (Esri)
FAGE5_CY 	 2018 Female Population Age 5 (Esri)
FAGE6_CY 	 2018 Female Population Age 6 (Esri)
FAGE7_CY 	 2018 Female Population Age 7 (Esri)
FAGE8_CY 	 2018 Female Population Age 8 (Esri)
FAGE9_CY 	 2018 Female Population Age 9 (Esri)
FAGE10_CY 	 2018 Female Population Age 10 (Esri)
FAGE11_CY 	 2018 Female Population Age 11 (Esri)
FAGE12_CY 	 2018 Female Population Age 12 (Esri)
FAGE13_CY 	 2018 Female Population Age 13 (Esri)
FAGE14_CY 	 2018 Female Population Age 14 (Esri)
FAGE15_CY 	 2018 Female Population Age 15 (Esri)
FAGE16_CY 	 2018 Female Population Age 16 (Esri)
FAGE17_CY 	 2018 Female Population Age 17 (Esri)
FAGE18_CY 	 2018 Female Population Age 18 (Esri)
FAGE19_CY 	 2018 Female Population Age 19 (Esri)
FAGE20_CY 	 2018 Female Population Age 20 (Esri)
FAGE21_CY 	 2018 Female Population Age 21 (Esri)
FAGE22_CY 	 2018 Female Population Age 22 (Esri)
FAGE23_CY 	 2018 Female Population Age 23 (Esri)
FAGE24_CY 	 2018 Female Population Age 24 (Esri)
FAGE25_CY 	 2018 Female Population Age 25 (Esri)
FAGE26_CY 	 2018 Female Population Age 26 (Esri)
FAGE27_CY 	 2018 Female Population Age 27 (Esri)
FAGE28_CY 	 2018 Female Population Age 28 (Esri)
FAGE29_CY 	 2018 Female Population Age 29 (Esri)
FAGE30_CY 	 2018 Female Population Age 30 (Esri)
FAGE31_CY 	 2018 Female Population Age 31 (Esri)
FAGE32_CY 	 2018 Female Population Age 32 (Esri)
FAGE33_CY 	 2018 Female Population Age 33 (Esri)
FAGE34_CY 	 2018 Female Population Age 34 (Esri)
FAGE35_CY 	 2018 Female Population Age 35 (Esri)
FAGE36_CY 	 2018 Female Population Age 36 (Esri)
FAGE37_CY 	 2018 Female Population Age 37 (Esri)
FAGE38_CY 	 2018 Female Population Age 38 (Esri)
FAGE39_CY 	 2018 Female Population Age 39 (Esri)
FAGE40_CY 	 2018 Female Population Age 40 (Esri)
FAGE41_CY 	 2018 Female Population Age 41 (Esri)
FAGE42_CY 	 2018 Female Population Age 42 (Esri)
FAGE43_CY 	 2018 Female Population Age 43 (Esri)
FAGE44_CY 	 2018 Female Population Age 44 (Esri)
FAGE45_CY 	 2018 Female Population Age 45 (Esri)
FAGE46_CY 	 2018 Female Population Age 46 (Esri)
FAGE47_CY 	 2018 Female Population Age 47 (Esri)
FAGE48_CY 	 2018 Female Population Age 48 (Esri)
FAGE49_CY 	 2018 Female Population Age 49 (Esri)
FAGE50_CY 	 2018 Female Population Age 50 (Esri)
FAGE51_CY 	 2018 Female Population Age 51 (Esri)
FAGE52_CY 	 2018 Female Population Age 52 (Esri)
FAGE53_CY 	 2018 Female Population Age 53 (Esri)
FAGE54_CY 	 2018 Female Population Age 54 (Esri)
FAGE55_CY 	 2018 Female Population Age 55 (Esri)
FAGE56_CY 	 2018 Female Population Age 56 (Esri)
FAGE57_CY 	 2018 Female Population Age 57 (Esri)
FAGE58_CY 	 2018 Female Population Age 58 (Esri)
FAGE59_CY 	 2018 Female Population Age 59 (Esri)
FAGE60_CY 	 2018 Female Population Age 60 (Esri)
FAGE61_CY 	 2018 Female Population Age 61 (Esri)
FAGE62_CY 	 2018 Female Population Age 62 (Esri)
FAGE63_CY 	 2018 Female Population Age 63 (Esri)
FAGE64_CY 	 2018 Female Population Age 64 (Esri)
FAGE65_CY 	 2018 Female Population Age 65 (Esri)
FAGE66_CY 	 2018 Female Population Age 66 (Esri)
FAGE67_CY 	 2018 Female Population Age 67 (Esri)
FAGE68_CY 	 2018 Female Population Age 68 (Esri)
FAGE69_CY 	 2018 Female Population Age 69 (Esri)
FAGE70_CY 	 2018 Female Population Age 70 (Esri)
FAGE71_CY 	 2018 Female Population Age 71 (Esri)
FAGE72_CY 	 2018 Female Population Age 72 (Esri)
FAGE73_CY 	 2018 Female Population Age 73 (Esri)
FAGE74_CY 	 2018 Female Population Age 74 (Esri)
FAGE75_CY 	 2018 Female Population Age 75 (Esri)
FAGE76_CY 	 2018 Female Population Age 76 (Esri)
FAGE77_CY 	 2018 Female Population Age 77 (Esri)
FAGE78_CY 	 2018 Female Population Age 78 (Esri)
FAGE79_CY 	 2018 Female Population Age 79 (Esri)
FAGE80_CY 	 2018 Female Population Age 80 (Esri)
FAGE81_CY 	 2018 Female Population Age 81 (Esri)
FAGE82_CY 	 2018 Female Population Age 82 (Esri)
FAGE83_CY 	 2018 Female Population Age 83 (Esri)
FAGE84_CY 	 2018 Female Population Age 84 (Esri)
WAGEBASECY 	 2018 White Population by Age Base (Esri)
WHTMBASECY 	 2018 White Male Population by Age Base (Esri)
WHTFBASECY 	 2018 White Female Population by Age Base (Esri)
BAGEBASECY 	 2018 Black Population by Age Base (Esri)
BLKMBASECY 	 2018 Black Male Population by Age Base (Esri)
BLKFBASECY 	 2018 Black Female Population by Age Base (Esri)
IAGEBASECY 	 2018 American Indian/Alaska Native Population by Age Base (Esri)
AIMBASE_CY 	 2018 American Indian/Alaska Native Male Population by Age Base (Esri)
AIFBASE_CY 	 2018 American Indian/Alaska Native Female Population by Age Base (Esri)
AAGEBASECY 	 2018 Asian Population by Age Base (Esri)
ASNMBASECY 	 2018 Asian Male Population by Age Base (Esri)
ASNFBASECY 	 2018 Asian Female Population by Age Base (Esri)
PAGEBASECY 	 2018 Pacific Islander Population by Age Base (Esri)
PIMBASE_CY 	 2018 Pacific Islander Male Population by Age Base (Esri)
PIFBASE_CY 	 2018 Pacific Islander Female Population by Age Base (Esri)
OAGEBASECY 	 2018 Other Race Population by Age Base (Esri)
OTHMBASECY 	 2018 Other Race Male Population by Age Base (Esri)
OTHFBASECY 	 2018 Other Race Female Population by Age Base (Esri)
MAGEBASECY 	 2018 Multiple Races Population by Age Base (Esri)
MLTMBASECY 	 2018 Multiple Races Male Population by Age Base (Esri)
MLTFBASECY 	 2018 Multiple Races Female Population by Age Base (Esri)
HAGEBASECY 	 2018 Hispanic Population by Age Base (Esri)
HSPMBASECY 	 2018 Hispanic Male Population by Age Base (Esri)
HSPFBASECY 	 2018 Hispanic Female Population by Age Base (Esri)
CIVLBFR_CY 	 2018 Civilian Population Age 16+ in Labor Force (Esri)
EMP_CY 	 2018 Employed Civilian Population Age 16+ (Esri)
INDAGRI_CY 	 2018 Industry: Agriculture/Forestry/Fishing/Hunting (Esri)
INDMIN_CY 	 2018 Industry: Mining/Quarrying/Oil & Gas Extraction (Esri)
INDCONS_CY 	 2018 Industry: Construction (Esri)
INDMANU_CY 	 2018 Industry: Manufacturing (Esri)
INDWHTR_CY 	 2018 Industry: Wholesale Trade (Esri)
INDRTTR_CY 	 2018 Industry: Retail Trade (Esri)
INDTRAN_CY 	 2018 Industry: Transportation/Warehousing (Esri)
INDUTIL_CY 	 2018 Industry: Utilities (Esri)
INDINFO_CY 	 2018 Industry: Information (Esri)
INDFIN_CY 	 2018 Industry: Finance/Insurance (Esri)
INDRE_CY 	 2018 Industry: Real Estate/Rental/Leasing (Esri)
INDTECH_CY 	 2018 Industry: Professional/Scientific/Tech Services (Esri)
INDMGMT_CY 	 2018 Industry: Management of Companies/Enterprises (Esri)
INDADMN_CY 	 2018 Industry: Admin/Support/Waste Management Services (Esri)
INDEDUC_CY 	 2018 Industry: Educational Services (Esri)
INDHLTH_CY 	 2018 Industry: Health Care/Social Assistance (Esri)
INDARTS_CY 	 2018 Industry: Arts/Entertainment/Recreation (Esri)
INDFOOD_CY 	 2018 Industry: Accommodation/Food Services (Esri)
INDOTSV_CY 	 2018 Industry: Other Services (excl Public Administration) (Esri)
INDPUBL_CY 	 2018 Industry: Public Administration (Esri)
INDBASE_CY 	 2018 Employed Civilian Population Age 16+ by Industry Base (Esri)
UNEMP_CY 	 2018 Unemployed Population Age 16+ (Esri)
UNEMPRT_CY 	 2018 Unemployment Rate (Esri)
OCCMGMT_CY 	 2018 Occupation: Management (Esri)
OCCBUS_CY 	 2018 Occupation: Business/Financial (Esri)
OCCCOMP_CY 	 2018 Occupation: Computer/Mathematical (Esri)
OCCARCH_CY 	 2018 Occupation: Architecture/Engineering (Esri)
OCCSSCI_CY 	 2018 Occupation: Life/Physical/Social Science (Esri)
OCCSSRV_CY 	 2018 Occupation: Community/Social Service (Esri)
OCCLEGL_CY 	 2018 Occupation: Legal (Esri)
OCCEDUC_CY 	 2018 Occupation: Education/Training/Library (Esri)
OCCENT_CY 	 2018 Occupation: Arts/Design/Entertainment/Sports/Media (Esri)
OCCHTCH_CY 	 2018 Occupation: Healthcare Practitioner/Technician (Esri)
OCCHLTH_CY 	 2018 Occupation: Healthcare Support (Esri)
OCCPROT_CY 	 2018 Occupation: Protective Service (Esri)
OCCFOOD_CY 	 2018 Occupation: Food Preparation/Serving Related (Esri)
OCCBLDG_CY 	 2018 Occupation: Building/Grounds Cleaning/Maintenance (Esri)
OCCPERS_CY 	 2018 Occupation: Personal Care/Service (Esri)
OCCSALE_CY 	 2018 Occupation: Sales and Sales Related (Esri)
OCCADMN_CY 	 2018 Occupation: Office/Administrative Support (Esri)
OCCFARM_CY 	 2018 Occupation: Farming/Fishing/Forestry (Esri)
OCCCONS_CY 	 2018 Occupation: Construction/Extraction (Esri)
OCCMAIN_CY 	 2018 Occupation: Installation/Maintenance/Repair (Esri)
OCCPROD_CY 	 2018 Occupation: Production (Esri)
OCCTRAN_CY 	 2018 Occupation: Transportation/Material Moving (Esri)
OCCBASE_CY 	 2018 Employed Civilian Population Age 16+ by Occupation Base (Esri)
WHITE_CY 	 2018 White Population (Esri)
BLACK_CY 	 2018 Black/African American Population (Esri)
AMERIND_CY 	 2018 American Indian/Alaska Native Population (Esri)
ASIAN_CY 	 2018 Asian Population (Esri)
PACIFIC_CY 	 2018 Pacific Islander Population (Esri)
OTHRACE_CY 	 2018 Other Race Population (Esri)
RACE2UP_CY 	 2018 Population of Two or More Races (Esri)
HISPPOP_CY 	 2018 Hispanic Population (Esri)
HISPWHT_CY 	 2018 Hispanic White Population (Esri)
HISPBLK_CY 	 2018 Hispanic Black/African American Population (Esri)
HISPAI_CY 	 2018 Hispanic American Indian/Alaska Native Population (Esri)
HISPASN_CY 	 2018 Hispanic Asian Population (Esri)
HISPPI_CY 	 2018 Hispanic Pacific Islander Population (Esri)
HISPOTH_CY 	 2018 Hispanic Other Race Population (Esri)
HISPMLT_CY 	 2018 Hispanic Population of Two or More Races (Esri)
NONHISP_CY 	 2018 Non-Hispanic Population (Esri)
NHSPWHT_CY 	 2018 White Non-Hispanic Population (Esri)
NHSPBLK_CY 	 2018 Black/African American Non-Hispanic Population (Esri)
NHSPAI_CY 	 2018 American Indian/Alaska Native Non-Hispanic Population (Esri)
NHSPASN_CY 	 2018 Asian Non-Hispanic Population (Esri)
NHSPPI_CY 	 2018 Pacific Islander Non-Hispanic Population (Esri)
NHSPOTH_CY 	 2018 Other Race Non-Hispanic Population (Esri)
NHSPMLT_CY 	 2018 Multiple Races Non-Hispanic Population (Esri)
MINORITYCY 	 2018 Minority Population (Esri)
DIVINDX_CY 	 2018 Diversity Index (Esri)
RACEBASECY 	 2018 Population by Race Base (Esri)
NOHS_CY 	 2018 Education: Less than 9th Grade (Esri)
SOMEHS_CY 	 2018 Education: 9-12th Grade/No Diploma (Esri)
HSGRAD_CY 	 2018 Education: High School Diploma (Esri)
GED_CY 	 2018 Education: GED/Alternative Credential (Esri)
SMCOLL_CY 	 2018 Education: Some College/No Degree (Esri)
ASSCDEG_CY 	 2018 Education: Associate's Degree (Esri)
BACHDEG_CY 	 2018 Education: Bachelor's Degree (Esri)
GRADDEG_CY 	 2018 Education: Graduate/Professional Degree (Esri)
EDUCBASECY 	 2018 Educational Attainment Base (Esri)
NEVMARR_CY 	 2018 Population Age 15+: Never Married (Esri)
MARRIED_CY 	 2018 Population Age 15+: Married (Esri)
WIDOWED_CY 	 2018 Population Age 15+: Widowed (Esri)
DIVORCD_CY 	 2018 Population Age 15+: Divorced (Esri)
MARBASE_CY 	 2018 Marital Status Base (Esri)
HINC0_CY 	 2018 Household Income less than $15,000 (Esri)
HINC15_CY 	 2018 Household Income $15,000-$24,999 (Esri)
HINC25_CY 	 2018 Household Income $25,000-$34,999 (Esri)
HINC35_CY 	 2018 Household Income $35,000-$49,999 (Esri)
HINC50_CY 	 2018 Household Income $50,000-$74,999 (Esri)
HINC75_CY 	 2018 Household Income $75,000-$99,999 (Esri)
HINC100_CY 	 2018 Household Income $100,000-$149,999 (Esri)
HINC150_CY 	 2018 Household Income $150,000-$199,999 (Esri)
HINC200_CY 	 2018 Household Income $200,000 or greater (Esri)
MEDHINC_CY 	 2018 Median Household Income (Esri)
AVGHINC_CY 	 2018 Average Household Income (Esri)
PCI_CY 	 2018 Per Capita Income (Esri)
AGGINC_CY 	 2018 Aggregate Income (Esri)
AGGHINC_CY 	 2018 Aggregate Household Income (Esri)
HINCBASECY 	 2018 Households by Income Base (Esri)
A15I0_CY 	 2018 Household Income less than $15,000 and Householder Age 15-24 (Esri)
A15I15_CY 	 2018 Household Income $15,000-$24,999 and Householder Age 15-24 (Esri)
A15I25_CY 	 2018 Household Income $25,000-$34,999 and Householder Age 15-24 (Esri)
A15I35_CY 	 2018 Household Income $35,000-$49,999 and Householder Age 15-24 (Esri)
A15I50_CY 	 2018 Household Income $50,000-$74,999 and Householder Age 15-24 (Esri)
A15I75_CY 	 2018 Household Income $75,000-$99,999 and Householder Age 15-24 (Esri)
A15I100_CY 	 2018 Household Income $100,000-$149,999 and Householder Age 15-24 (Esri)
A15I150_CY 	 2018 Household Income $150,000-$199,999 and Householder Age 15-24 (Esri)
A15I200_CY 	 2018 Household Income $200,000+ and Householder Age 15-24 (Esri)
MEDIA15_CY 	 2018 Median Household Income and Householder Age 15-24 (Esri)
AVGIA15_CY 	 2018 Average Household Income and Householder Age 15-24 (Esri)
IA15BASECY 	 2018 Households by Income Base and Householder Age 15-24 (Esri)
AGGIA15_CY 	 2018 Aggregate Household Income and Householder Age 15-24 (Esri)
A25I0_CY 	 2018 Household Income less than $15,000 and Householder Age 25-34 (Esri)
A25I15_CY 	 2018 Household Income $15,000-$24,999 and Householder Age 25-34 (Esri)
A25I25_CY 	 2018 Household Income $25,000-$34,999 and Householder Age 25-34 (Esri)
A25I35_CY 	 2018 Household Income $35,000-$49,999 and Householder Age 25-34 (Esri)
A25I50_CY 	 2018 Household Income $50,000-$74,999 and Householder Age 25-34 (Esri)
A25I75_CY 	 2018 Household Income $75,000-$99,999 and Householder Age 25-34 (Esri)
A25I100_CY 	 2018 Household Income $100,000-$149,999 and Householder Age 25-34 (Esri)
A25I150_CY 	 2018 Household Income $150,000-$199,999 and Householder Age 25-34 (Esri)
A25I200_CY 	 2018 Household Income $200,000+ and Householder Age 25-34 (Esri)
MEDIA25_CY 	 2018 Median Household Income and Householder Age 25-34 (Esri)
AVGIA25_CY 	 2018 Average Household Income and Householder Age 25-34 (Esri)
IA25BASECY 	 2018 Households by Income Base and Householder Age 25-34 (Esri)
AGGIA25_CY 	 2018 Aggregate Household Income and Householder Age 25-34 (Esri)
A35I0_CY 	 2018 Household Income less than $15,000 and Householder Age 35-44 (Esri)
A35I15_CY 	 2018 Household Income $15,000-$24,999 and Householder Age 35-44 (Esri)
A35I25_CY 	 2018 Household Income $25,000-$34,999 and Householder Age 35-44 (Esri)
A35I35_CY 	 2018 Household Income $35,000-$49,999 and Householder Age 35-44 (Esri)
A35I50_CY 	 2018 Household Income $50,000-$74,999 and Householder Age 35-44 (Esri)
A35I75_CY 	 2018 Household Income $75,000-$99,999 and Householder Age 35-44 (Esri)
A35I100_CY 	 2018 Household Income $100,000-$149,999 and Householder Age 35-44 (Esri)
A35I150_CY 	 2018 Household Income $150,000-$199,999 and Householder Age 35-44 (Esri)
A35I200_CY 	 2018 Household Income $200,000+ and Householder Age 35-44 (Esri)
MEDIA35_CY 	 2018 Median Household Income and Householder Age 35-44 (Esri)
AVGIA35_CY 	 2018 Average Household Income and Householder Age 35-44 (Esri)
IA35BASECY 	 2018 Households by Income Base and Householder Age 35-44 (Esri)
AGGIA35_CY 	 2018 Aggregate Household Income and Householder Age 35-44 (Esri)
A45I0_CY 	 2018 Household Income less than $15,000 and Householder Age 45-54 (Esri)
A45I15_CY 	 2018 Household Income $15,000-$24,999 and Householder Age 45-54 (Esri)
A45I25_CY 	 2018 Household Income $25,000-$34,999 and Householder Age 45-54 (Esri)
A45I35_CY 	 2018 Household Income $35,000-$49,999 and Householder Age 45-54 (Esri)
A45I50_CY 	 2018 Household Income $50,000-$74,999 and Householder Age 45-54 (Esri)
A45I75_CY 	 2018 Household Income $75,000-$99,999 and Householder Age 45-54 (Esri)
A45I100_CY 	 2018 Household Income $100,000-$149,999 and Householder Age 45-54 (Esri)
A45I150_CY 	 2018 Household Income $150,000-$199,999 and Householder Age 45-54 (Esri)
A45I200_CY 	 2018 Household Income $200,000+ and Householder Age 45-54 (Esri)
MEDIA45_CY 	 2018 Median Household Income and Householder Age 45-54 (Esri)
AVGIA45_CY 	 2018 Average Household Income and Householder Age 45-54 (Esri)
IA45BASECY 	 2018 Households by Income Base and Householder Age 45-54 (Esri)
AGGIA45_CY 	 2018 Aggregate Household Income and Householder Age 45-54 (Esri)
A55I0_CY 	 2018 Household Income less than $15,000 and Householder Age 55-64 (Esri)
A55I15_CY 	 2018 Household Income $15,000-$24,999 and Householder Age 55-64 (Esri)
A55I25_CY 	 2018 Household Income $25,000-$34,999 and Householder Age 55-64 (Esri)
A55I35_CY 	 2018 Household Income $35,000-$49,999 and Householder Age 55-64 (Esri)
A55I50_CY 	 2018 Household Income $50,000-$74,999 and Householder Age 55-64 (Esri)
A55I75_CY 	 2018 Household Income $75,000-$99,999 and Householder Age 55-64 (Esri)
A55I100_CY 	 2018 Household Income $100,000-$149,999 and Householder Age 55-64 (Esri)
A55I150_CY 	 2018 Household Income $150,000-$199,999 and Householder Age 55-64 (Esri)
A55I200_CY 	 2018 Household Income $200,000+ and Householder Age 55-64 (Esri)
MEDIA55_CY 	 2018 Median Household Income and Householder Age 55-64 (Esri)
AVGIA55_CY 	 2018 Average Household Income and Householder Age 55-64 (Esri)
IA55BASECY 	 2018 Households by Income Base and Householder Age 55-64 (Esri)
AGGIA55_CY 	 2018 Aggregate Household Income and Householder Age 55-64 (Esri)
A65I0_CY 	 2018 Household Income less than $15,000 and Householder Age 65-74 (Esri)
A65I15_CY 	 2018 Household Income $15,000-$24,999 and Householder Age 65-74 (Esri)
A65I25_CY 	 2018 Household Income $25,000-$34,999 and Householder Age 65-74 (Esri)
A65I35_CY 	 2018 Household Income $35,000-$49,999 and Householder Age 65-74 (Esri)
A65I50_CY 	 2018 Household Income $50,000-$74,999 and Householder Age 65-74 (Esri)
A65I75_CY 	 2018 Household Income $75,000-$99,999 and Householder Age 65-74 (Esri)
A65I100_CY 	 2018 Household Income $100,000-$149,999 and Householder Age 65-74 (Esri)
A65I150_CY 	 2018 Household Income $150,000-$199,999 and Householder Age 65-74 (Esri)
A65I200_CY 	 2018 Household Income $200,000+ and Householder Age 65-74 (Esri)
MEDIA65_CY 	 2018 Median Household Income and Householder Age 65-74 (Esri)
AVGIA65_CY 	 2018 Average Household Income and Householder Age 65-74 (Esri)
IA65BASECY 	 2018 Households by Income Base and Householder Age 65-74 (Esri)
AGGIA65_CY 	 2018 Aggregate Household Income and Householder Age 65-74 (Esri)
A75I0_CY 	 2018 Household Income less than $15,000 and Householder Age 75+ (Esri)
A75I15_CY 	 2018 Household Income $15,000-$24,999 and Householder Age 75+ (Esri)
A75I25_CY 	 2018 Household Income $25,000-$34,999 and Householder Age 75+ (Esri)
A75I35_CY 	 2018 Household Income $35,000-$49,999 and Householder Age 75+ (Esri)
A75I50_CY 	 2018 Household Income $50,000-$74,999 and Householder Age 75+ (Esri)
A75I75_CY 	 2018 Household Income $75,000-$99,999 and Householder Age 75+ (Esri)
A75I100_CY 	 2018 Household Income $100,000-$149,999 and Householder Age 75+ (Esri)
A75I150_CY 	 2018 Household Income $150,000-$199,999 and Householder Age 75+ (Esri)
A75I200_CY 	 2018 Household Income $200,000+ and Householder Age 75+ (Esri)
MEDIA75_CY 	 2018 Median Household Income and Householder Age 75+ (Esri)
AVGIA75_CY 	 2018 Average Household Income and Householder Age 75+ (Esri)
IA75BASECY 	 2018 Households by Income Base and Householder Age 75+ (Esri)
AGGIA75_CY 	 2018 Aggregate Household Income and Householder Age 75+ (Esri)
MEDHHR_CY 	 2018 Median Age of Householder (Esri)
MEDIA55UCY 	 2018 Median Household Income and Householder Age 55+ (Esri)
AVGIA55UCY 	 2018 Average Household Income and Householder Age 55+ (Esri)
IA55UBASCY 	 2018 Households by Income Base and Householder Age 55+ (Esri)
MEDIA65UCY 	 2018 Median Household Income and Householder Age 65+ (Esri)
AVGIA65UCY 	 2018 Average Household Income and Householder Age 65+ (Esri)
IA65UBASCY 	 2018 Households by Income Base and Householder Age 65+ (Esri)
DI0_CY 	 2018 Disposable Income less than $15,000 (Esri)
DI15_CY 	 2018 Disposable Income $15,000-$24,999 (Esri)
DI25_CY 	 2018 Disposable Income $25,000-$34,999 (Esri)
DI35_CY 	 2018 Disposable Income $35,000-$49,999 (Esri)
DI50_CY 	 2018 Disposable Income $50,000-$74,999 (Esri)
DI75_CY 	 2018 Disposable Income $75,000-$99,999 (Esri)
DI100_CY 	 2018 Disposable Income $100,000-$149,999 (Esri)
DI150_CY 	 2018 Disposable Income $150,000-$199,999 (Esri)
DI200_CY 	 2018 Disposable Income $200,000 or greater (Esri)
AGGDI_CY 	 2018 Aggregate Disposable Income
MEDDI_CY 	 2018 Median Disposable Income (Esri)
AVGDI_CY 	 2018 Average Disposable Income (Esri)
A15DI0_CY 	 2018 Disposable Income less than $15,000 and Householder Age 15-24 (Esri)
A15DI15_CY 	 2018 Disposable Income $15,000-$24,999 and Householder Age 15-24 (Esri)
A15DI25_CY 	 2018 Disposable Income $25,000-$34,999 and Householder Age 15-24 (Esri)
A15DI35_CY 	 2018 Disposable Income $35,000-$49,999 and Householder Age 15-24 (Esri)
A15DI50_CY 	 2018 Disposable Income $50,000-$74,999 and Householder Age 15-24 (Esri)
A15DI75_CY 	 2018 Disposable Income $75,000-$99,999 and Householder Age 15-24 (Esri)
A15DI100CY 	 2018 Disposable Income $100,000-$149,999 and Householder Age 15-24 (Esri)
A15DI150CY 	 2018 Disposable Income $150,000-$199,999 and Householder Age 15-24 (Esri)
A15DI200CY 	 2018 Disposable Income $200,000+ and Householder Age 15-24 (Esri)
AGGDIA15CY 	 2018 Aggregate Disposable Income: Householder 15-24
MEDDIA15CY 	 2018 Median Disposable Income and Householder Age 15-24 (Esri)
AVGDIA15CY 	 2018 Average Disposable Income and Householder Age 15-24 (Esri)
A25DI0_CY 	 2018 Disposable Income less than $15,000 and Householder Age 25-34 (Esri)
A25DI15_CY 	 2018 Disposable Income $15,000-$24,999 and Householder Age 25-34 (Esri)
A25DI25_CY 	 2018 Disposable Income $25,000-$34,999 and Householder Age 25-34 (Esri)
A25DI35_CY 	 2018 Disposable Income $35,000-$49,999 and Householder Age 25-34 (Esri)
A25DI50_CY 	 2018 Disposable Income $50,000-$74,999 and Householder Age 25-34 (Esri)
A25DI75_CY 	 2018 Disposable Income $75,000-$99,999 and Householder Age 25-34 (Esri)
A25DI100CY 	 2018 Disposable Income $100,000-$149,999 and Householder Age 25-34 (Esri)
A25DI150CY 	 2018 Disposable Income $150,000-$199,999 and Householder Age 25-34 (Esri)
A25DI200CY 	 2018 Disposable Income $200,000+ and Householder Age 25-34 (Esri)
AGGDIA25CY 	 2018 Aggregate Disposable Income: Householder 25-34
MEDDIA25CY 	 2018 Median Disposable Income and Householder Age 25-34 (Esri)
AVGDIA25CY 	 2018 Average Disposable Income and Householder Age 25-34 (Esri)
A35DI0_CY 	 2018 Disposable Income less than $15,000 and Householder Age 35-44 (Esri)
A35DI15_CY 	 2018 Disposable Income $15,000-$24,999 and Householder Age 35-44 (Esri)
A35DI25_CY 	 2018 Disposable Income $25,000-$34,999 and Householder Age 35-44 (Esri)
A35DI35_CY 	 2018 Disposable Income $35,000-$49,999 and Householder Age 35-44 (Esri)
A35DI50_CY 	 2018 Disposable Income $50,000-$74,999 and Householder Age 35-44 (Esri)
A35DI75_CY 	 2018 Disposable Income $75,000-$99,999 and Householder Age 35-44 (Esri)
A35DI100CY 	 2018 Disposable Income $100,000-$149,999 and Householder Age 35-44 (Esri)
A35DI150CY 	 2018 Disposable Income $150,000-$199,999 and Householder Age 35-44 (Esri)
A35DI200CY 	 2018 Disposable Income $200,000+ and Householder Age 35-44 (Esri)
AGGDIA35CY 	 2018 Aggregate Disposable Income: Householder 35-44
MEDDIA35CY 	 2018 Median Disposable Income and Householder Age 35-44 (Esri)
AVGDIA35CY 	 2018 Average Disposable Income and Householder Age 35-44 (Esri)
A45DI0_CY 	 2018 Disposable Income less than $15,000 and Householder Age 45-54 (Esri)
A45DI15_CY 	 2018 Disposable Income $15,000-$24,999 and Householder Age 45-54 (Esri)
A45DI25_CY 	 2018 Disposable Income $25,000-$34,999 and Householder Age 45-54 (Esri)
A45DI35_CY 	 2018 Disposable Income $35,000-$49,999 and Householder Age 45-54 (Esri)
A45DI50_CY 	 2018 Disposable Income $50,000-$74,999 and Householder Age 45-54 (Esri)
A45DI75_CY 	 2018 Disposable Income $75,000-$99,999 and Householder Age 45-54 (Esri)
A45DI100CY 	 2018 Disposable Income $100,000-$149,999 and Householder Age 45-54 (Esri)
A45DI150CY 	 2018 Disposable Income $150,000-$199,999 and Householder Age 45-54 (Esri)
A45DI200CY 	 2018 Disposable Income $200,000+ and Householder Age 45-54 (Esri)
AGGDIA45CY 	 2018 Aggregate Disposable Income: Householder 45-54
MEDDIA45CY 	 2018 Median Disposable Income and Householder Age 45-54 (Esri)
AVGDIA45CY 	 2018 Average Disposable Income and Householder Age 45-54 (Esri)
A55DI0_CY 	 2018 Disposable Income less than $15,000 and Householder Age 55-64 (Esri)
A55DI15_CY 	 2018 Disposable Income $15,000-$24,999 and Householder Age 55-64 (Esri)
A55DI25_CY 	 2018 Disposable Income $25,000-$34,999 and Householder Age 55-64 (Esri)
A55DI35_CY 	 2018 Disposable Income $35,000-$49,999 and Householder Age 55-64 (Esri)
A55DI50_CY 	 2018 Disposable Income $50,000-$74,999 and Householder Age 55-64 (Esri)
A55DI75_CY 	 2018 Disposable Income $75,000-$99,999 and Householder Age 55-64 (Esri)
A55DI100CY 	 2018 Disposable Income $100,000-$149,999 and Householder Age 55-64 (Esri)
A55DI150CY 	 2018 Disposable Income $150,000-$199,999 and Householder Age 55-64 (Esri)
A55DI200CY 	 2018 Disposable Income $200,000+ and Householder Age 55-64 (Esri)
AGGDIA55CY 	 2018 Aggregate Disposable Income: Householder 55-64
MEDDIA55CY 	 2018 Median Disposable Income and Householder Age 55-64 (Esri)
AVGDIA55CY 	 2018 Average Disposable Income and Householder Age 55-64 (Esri)
A65DI0_CY 	 2018 Disposable Income less than $15,000 and Householder Age 65-74 (Esri)
A65DI15_CY 	 2018 Disposable Income $15,000-$24,999 and Householder Age 65-74 (Esri)
A65DI25_CY 	 2018 Disposable Income $25,000-$34,999 and Householder Age 65-74 (Esri)
A65DI35_CY 	 2018 Disposable Income $35,000-$49,999 and Householder Age 65-74 (Esri)
A65DI50_CY 	 2018 Disposable Income $50,000-$74,999 and Householder Age 65-74 (Esri)
A65DI75_CY 	 2018 Disposable Income $75,000-$99,999 and Householder Age 65-74 (Esri)
A65DI100CY 	 2018 Disposable Income $100,000-$149,999 and Householder Age 65-74 (Esri)
A65DI150CY 	 2018 Disposable Income $150,000-$199,999 and Householder Age 65-74 (Esri)
A65DI200CY 	 2018 Disposable Income $200,000+ and Householder Age 65-74 (Esri)
AGGDIA65CY 	 2018 Aggregate Disposable Income: Householder 65-74
MEDDIA65CY 	 2018 Median Disposable Income and Householder Age 65-74 (Esri)
AVGDIA65CY 	 2018 Average Disposable Income and Householder Age 65-74 (Esri)
A75DI0_CY 	 2018 Disposable Income less than $15,000 and Householder Age 75+ (Esri)
A75DI15_CY 	 2018 Disposable Income $15,000-$24,999 and Householder Age 75+ (Esri)
A75DI25_CY 	 2018 Disposable Income $25,000-$34,999 and Householder Age 75+ (Esri)
A75DI35_CY 	 2018 Disposable Income $35,000-$49,999 and Householder Age 75+ (Esri)
A75DI50_CY 	 2018 Disposable Income $50,000-$74,999 and Householder Age 75+ (Esri)
A75DI75_CY 	 2018 Disposable Income $75,000-$99,999 and Householder Age 75+ (Esri)
A75DI100CY 	 2018 Disposable Income $100,000-$149,999 and Householder Age 75+ (Esri)
A75DI150CY 	 2018 Disposable Income $150,000-$199,999 and Householder Age 75+ (Esri)
A75DI200CY 	 2018 Disposable Income $200,000 or greater and Householder Age 75+ (Esri)
AGGDIA75CY 	 2018 Aggregate Disposable Income: Householder 75+
MEDDIA75CY 	 2018 Median Disposable Income and Householder Age 75+ (Esri)
AVGDIA75CY 	 2018 Average Disposable Income and Householder Age 75+ (Esri)
DIA15BASCY 	 2018 HHs by Disposable Income Base and Householder Age 15-24 (Esri)
DIA25BASCY 	 2018 HHs by Disposable Income Base and Householder Age 25-34 (Esri)
DIA35BASCY 	 2018 HHs by Disposable Income Base and Householder Age 35-44 (Esri)
DIA45BASCY 	 2018 HHs by Disposable Income Base and Householder Age 45-54 (Esri)
DIA55BASCY 	 2018 HHs by Disposable Income Base and Householder Age 55-64 (Esri)
DIA65BASCY 	 2018 HHs by Disposable Income Base and Householder Age 65-74 (Esri)
DIA75BASCY 	 2018 Households by Disposable Income Base and Householder Age 75+ (Esri)
DIBASE_CY 	 2018 Households by Disposable Income Base (Esri)
NW0_CY 	 2018 Net Worth less than $15,000 (Esri)
NW15_CY 	 2018 Net Worth $15,000-$34,999 (Esri)
NW35_CY 	 2018 Net Worth $35,000-$49,999 (Esri)
NW50_CY 	 2018 Net Worth $50,000-$74,999 (Esri)
NW75_CY 	 2018 Net Worth $75,000-$99,999 (Esri)
NW100_CY 	 2018 Net Worth $100,000-$149,999 (Esri)
NW150_CY 	 2018 Net Worth $150,000-$249,999 (Esri)
NW250_CY 	 2018 Net Worth $250,000-$499,999 (Esri)
NW500_CY 	 2018 Net Worth $500,000 or greater (Esri)
AGGNW_CY 	 2018 Aggregate Net Worth
MEDNW_CY 	 2018 Median Net Worth (Esri)
AVGNW_CY 	 2018 Average Net Worth (Esri)
NWBASE_CY 	 2018 Households by Net Worth Base (Esri)
A15NW0_CY 	 2018 Net Worth less than $15,000 and Householder Age 15-24 (Esri)
A15NW15_CY 	 2018 Net Worth $15,000-$34,999 and Householder Age 15-24 (Esri)
A15NW35_CY 	 2018 Net Worth $35,000-$49,999 and Householder Age 15-24 (Esri)
A15NW50_CY 	 2018 Net Worth $50,000-$99,999 and Householder Age 15-24 (Esri)
A15NW100CY 	 2018 Net Worth $100,000-$149,999 and Householder Age 15-24 (Esri)
A15NW150CY 	 2018 Net Worth $150,000-$249,999 and Householder Age 15-24 (Esri)
A15NW250CY 	 2018 Net Worth $250,000 or greater and Householder Age 15-24 (Esri)
AGGNWA15CY 	 2018 Aggregate Net Worth: Householder 15-24
MEDNWA15CY 	 2018 Median Net Worth and Householder Age 15-24 (Esri)
AVGNWA15CY 	 2018 Average Net Worth and Householder Age 15-24 (Esri)
A25NW0_CY 	 2018 Net Worth less than $15,000 and Householder Age 25-34 (Esri)
A25NW15_CY 	 2018 Net Worth $15,000-$34,999 and Householder Age 25-34 (Esri)
A25NW35_CY 	 2018 Net Worth $35,000-$49,999 and Householder Age 25-34 (Esri)
A25NW50_CY 	 2018 Net Worth $50,000-$99,999 and Householder Age 25-34 (Esri)
A25NW100CY 	 2018 Net Worth $100,000-$149,999 and Householder Age 25-34 (Esri)
A25NW150CY 	 2018 Net Worth $150,000-$249,999 and Householder Age 25-34 (Esri)
A25NW250CY 	 2018 Net Worth $250,000 or greater and Householder Age 25-34 (Esri)
AGGNWA25CY 	 2018 Aggregate Net Worth: Householder 25-34
MEDNWA25CY 	 2018 Median Net Worth and Householder Age 25-34 (Esri)
AVGNWA25CY 	 2018 Average Net Worth and Householder Age 25-34 (Esri)
A35NW0_CY 	 2018 Net Worth less than $15,000 and Householder Age 35-44 (Esri)
A35NW15_CY 	 2018 Net Worth $15,000-$34,999 and Householder Age 35-44 (Esri)
A35NW35_CY 	 2018 Net Worth $35,000-$49,999 and Householder Age 35-44 (Esri)
A35NW50_CY 	 2018 Net Worth $50,000-$99,999 and Householder Age 35-44 (Esri)
A35NW100CY 	 2018 Net Worth $100,000-$149,999 and Householder Age 35-44 (Esri)
A35NW150CY 	 2018 Net Worth $150,000-$249,999 and Householder Age 35-44 (Esri)
A35NW250CY 	 2018 Net Worth $250,000 or greater and Householder Age 35-44 (Esri)
AGGNWA35CY 	 2018 Aggregate Net Worth: Householder 35-44
MEDNWA35CY 	 2018 Median Net Worth and Householder Age 35-44 (Esri)
AVGNWA35CY 	 2018 Average Net Worth and Householder Age 35-44 (Esri)
A45NW0_CY 	 2018 Net Worth less than $15,000 and Householder Age 45-54 (Esri)
A45NW15_CY 	 2018 Net Worth $15,000-$34,999 and Householder Age 45-54 (Esri)
A45NW35_CY 	 2018 Net Worth $35,000-$49,999 and Householder Age 45-54 (Esri)
A45NW50_CY 	 2018 Net Worth $50,000-$99,999 and Householder Age 45-54 (Esri)
A45NW100CY 	 2018 Net Worth $100,000-$149,999 and Householder Age 45-54 (Esri)
A45NW150CY 	 2018 Net Worth $150,000-$249,999 and Householder Age 45-54 (Esri)
A45NW250CY 	 2018 Net Worth $250,000 or greater and Householder Age 45-54 (Esri)
AGGNWA45CY 	 2018 Aggregate Net Worth: Householder 45-54
MEDNWA45CY 	 2018 Median Net Worth and Householder Age 45-54 (Esri)
AVGNWA45CY 	 2018 Average Net Worth and Householder Age 45-54 (Esri)
A55NW0_CY 	 2018 Net Worth less than $15,000 and Householder Age 55-64 (Esri)
A55NW15_CY 	 2018 Net Worth $15,000-$34,999 and Householder Age 55-64 (Esri)
A55NW35_CY 	 2018 Net Worth $35,000-$49,999 and Householder Age 55-64 (Esri)
A55NW50_CY 	 2018 Net Worth $50,000-$99,999 and Householder Age 55-64 (Esri)
A55NW100CY 	 2018 Net Worth $100,000-$149,999 and Householder Age 55-64 (Esri)
A55NW150CY 	 2018 Net Worth $150,000-$249,999 and Householder Age 55-64 (Esri)
A55NW250CY 	 2018 Net Worth $250,000 or greater and Householder Age 55-64 (Esri)
AGGNWA55CY 	 2018 Aggregate Net Worth: Householder 55-64
MEDNWA55CY 	 2018 Median Net Worth and Householder Age 55-64 (Esri)
AVGNWA55CY 	 2018 Average Net Worth and Householder Age 55-64 (Esri)
A65NW0_CY 	 2018 Net Worth less than $15,000 and Householder Age 65-74 (Esri)
A65NW15_CY 	 2018 Net Worth $15,000-$34,999 and Householder Age 65-74 (Esri)
A65NW35_CY 	 2018 Net Worth $35,000-$49,999 and Householder Age 65-74 (Esri)
A65NW50_CY 	 2018 Net Worth $50,000-$99,999 and Householder Age 65-74 (Esri)
A65NW100CY 	 2018 Net Worth $100,000-$149,999 and Householder Age 65-74 (Esri)
A65NW150CY 	 2018 Net Worth $150,000-$249,999 and Householder Age 65-74 (Esri)
A65NW250CY 	 2018 Net Worth $250,000 or greater and Householder Age 65-74 (Esri)
AGGNWA65CY 	 2018 Aggregate Net Worth: Householder 65-74
MEDNWA65CY 	 2018 Median Net Worth and Householder Age 65-74 (Esri)
AVGNWA65CY 	 2018 Average Net Worth and Householder Age 65-74 (Esri)
A75NW0_CY 	 2018 Net Worth less than $15,000 and Householder Age 75+ (Esri)
A75NW15_CY 	 2018 Net Worth $15,000-$34,999 and Householder Age 75+ (Esri)
A75NW35_CY 	 2018 Net Worth $35,000-$49,999 and Householder Age 75+ (Esri)
A75NW50_CY 	 2018 Net Worth $50,000-$99,999 and Householder Age 75+ (Esri)
A75NW100CY 	 2018 Net Worth $100,000-$149,999 and Householder Age 75+ (Esri)
A75NW150CY 	 2018 Net Worth $150,000-$249,999 and Householder Age 75+ (Esri)
A75NW250CY 	 2018 Net Worth $250,000 or greater and Householder Age 75+ (Esri)
AGGNWA75CY 	 2018 Aggregate Net Worth: Householder 75+
MEDNWA75CY 	 2018 Median Net Worth and Householder Age 75+ (Esri)
AVGNWA75CY 	 2018 Average Net Worth and Householder Age 75+ (Esri)
NWA15BASCY 	 2018 Households by Net Worth Base and Householder Age 15-24 (Esri)
NWA25BASCY 	 2018 Households by Net Worth Base and Householder Age 25-34 (Esri)
NWA35BASCY 	 2018 Households by Net Worth Base and Householder Age 35-44 (Esri)
NWA45BASCY 	 2018 Households by Net Worth Base and Householder Age 45-54 (Esri)
NWA55BASCY 	 2018 Households by Net Worth Base and Householder Age 55-64 (Esri)
NWA65BASCY 	 2018 Households by Net Worth Base and Householder Age 65-74 (Esri)
NWA75BASCY 	 2018 Households by Net Worth Base and Householder Age 75+ (Esri)
VAL0_CY 	 2018 Home Value less than $50,000 (Esri)
VAL50K_CY 	 2018 Home Value $50,000-$99,999 (Esri)
VAL100K_CY 	 2018 Home Value $100,000-$149,999 (Esri)
VAL150K_CY 	 2018 Home Value $150,000-$199,999 (Esri)
VAL200K_CY 	 2018 Home Value $200,000-$249,999 (Esri)
VAL250K_CY 	 2018 Home Value $250,000-$299,999 (Esri)
VAL300K_CY 	 2018 Home Value $300,000-$399,999 (Esri)
VAL400K_CY 	 2018 Home Value $400,000-$499,999 (Esri)
VAL500K_CY 	 2018 Home Value $500,000-$749,999 (Esri)
VAL750K_CY 	 2018 Home Value $750,000-$999,999 (Esri)
VAL1M_CY 	 2018 Home Value $1,000,000-$1,499,999 (Esri)
VAL1PT5MCY 	 2018 Home Value $1,500,000-$1,999,999 (Esri)
VAL2M_CY 	 2018 Home Value $2,000,000 or greater (Esri)
VALBASE_CY 	 2018 Owner Occupied Housing Units by Value Base (Esri)
MEDVAL_CY 	 2018 Median Home Value (Esri)
AVGVAL_CY 	 2018 Average Home Value (Esri)
LANDAREA 	 Land Area in Square Miles
TOTPOP_FY 	 2023 Total Population (Esri)
HHPOP_FY 	 2023 Household Population (Esri)
FAMPOP_FY 	 2023 Family Population (Esri)
GQPOP_FY 	 2023 Group Quarters Population (Esri)
POPDENS_FY 	 2023 Population Density (Pop per Square Mile) (Esri)
TOTHH_FY 	 2023 Total Households (Esri)
AVGHHSZ_FY 	 2023 Average Household Size (Esri)
FAMHH_FY 	 2023 Total Family Households (Esri)
AVGFMSZ_FY 	 2023 Average Family Size (Esri)
TOTHU_FY 	 2023 Total Housing Units (Esri)
OWNER_FY 	 2023 Owner Occupied Housing Units (Esri)
RENTER_FY 	 2023 Renter Occupied Housing Units (Esri)
VACANT_FY 	 2023 Vacant Housing Units (Esri)
POPGRWCYFY 	 2018-2023 Population: Annual Growth Rate (Esri)
HHGRWCYFY 	 2018-2023 Households: Annual Growth Rate (Esri)
FAMGRWCYFY 	 2018-2023 Families: Annual Growth Rate (Esri)
PCIGRWCYFY 	 2018-2023 Per Capita Income: Annual Growth Rate (Esri)
OWNGRWCYFY 	 2018-2023 Owner Occupied Housing Units Annual Compound Growth Rate (Esri)
MHIGRWCYFY 	 2018-2023 Median Household Income: Annual Growth Rate (Esri)
GENALPHAFY 	 2023 Generation Alpha Population (Born 2017 or Later)
GENZ_FY 	 2023 Generation Z Population (Born 1999 to 2016)
MILLENN_FY 	 2023 Millennial Population (Born 1981 to 1998)
GENX_FY 	 2023 Generation X Population (Born 1965 to 1980)
BABYBOOMFY 	 2023 Baby Boomer Population (Born 1946 to 1964)
OLDRGENSFY 	 2023 Silent & Greatest Generations Population (Born 1945/Earlier)
GENBASE_FY 	 2023 Population by Generation Base
POP0_FY 	 2023 Total Population Age 0-4 (Esri)
POP5_FY 	 2023 Total Population Age 5-9 (Esri)
POP10_FY 	 2023 Total Population Age 10-14 (Esri)
POP15_FY 	 2023 Total Population Age 15-19 (Esri)
POP20_FY 	 2023 Total Population Age 20-24 (Esri)
POP25_FY 	 2023 Total Population Age 25-29 (Esri)
POP30_FY 	 2023 Total Population Age 30-34 (Esri)
POP35_FY 	 2023 Total Population Age 35-39 (Esri)
POP40_FY 	 2023 Total Population Age 40-44 (Esri)
POP45_FY 	 2023 Total Population Age 45-49 (Esri)
POP50_FY 	 2023 Total Population Age 50-54 (Esri)
POP55_FY 	 2023 Total Population Age 55-59 (Esri)
POP60_FY 	 2023 Total Population Age 60-64 (Esri)
POP65_FY 	 2023 Total Population Age 65-69 (Esri)
POP70_FY 	 2023 Total Population Age 70-74 (Esri)
POP75_FY 	 2023 Total Population Age 75-79 (Esri)
POP80_FY 	 2023 Total Population Age 80-84 (Esri)
POP85_FY 	 2023 Total Population Age 85+ (Esri)
POP18UP_FY 	 2023 Total Population Age 18+ (Esri)
POP21UP_FY 	 2023 Total Population Age 21+ (Esri)
MEDAGE_FY 	 2023 Median Age (Esri)
MALES_FY 	 2023 Male Population (Esri)
MALE0_FY 	 2023 Male Population Age 0-4 (Esri)
MALE5_FY 	 2023 Male Population Age 5-9 (Esri)
MALE10_FY 	 2023 Male Population Age 10-14 (Esri)
MALE15_FY 	 2023 Male Population Age 15-19 (Esri)
MALE20_FY 	 2023 Male Population Age 20-24 (Esri)
MALE25_FY 	 2023 Male Population Age 25-29 (Esri)
MALE30_FY 	 2023 Male Population Age 30-34 (Esri)
MALE35_FY 	 2023 Male Population Age 35-39 (Esri)
MALE40_FY 	 2023 Male Population Age 40-44 (Esri)
MALE45_FY 	 2023 Male Population Age 45-49 (Esri)
MALE50_FY 	 2023 Male Population Age 50-54 (Esri)
MALE55_FY 	 2023 Male Population Age 55-59 (Esri)
MALE60_FY 	 2023 Male Population Age 60-64 (Esri)
MALE65_FY 	 2023 Male Population Age 65-69 (Esri)
MALE70_FY 	 2023 Male Population Age 70-74 (Esri)
MALE75_FY 	 2023 Male Population Age 75-79 (Esri)
MALE80_FY 	 2023 Male Population Age 80-84 (Esri)
MALE85_FY 	 2023 Male Population Age 85+ (Esri)
MAL18UP_FY 	 2023 Male Population Age 18+ (Esri)
MAL21UP_FY 	 2023 Male Population Age 21+ (Esri)
MEDMAGE_FY 	 2023 Median Male Age (Esri)
FEMALES_FY 	 2023 Female Population (Esri)
FEM0_FY 	 2023 Female Population Age 0-4 (Esri)
FEM5_FY 	 2023 Female Population Age 5-9 (Esri)
FEM10_FY 	 2023 Female Population Age 10-14 (Esri)
FEM15_FY 	 2023 Female Population Age 15-19 (Esri)
FEM20_FY 	 2023 Female Population Age 20-24 (Esri)
FEM25_FY 	 2023 Female Population Age 25-29 (Esri)
FEM30_FY 	 2023 Female Population Age 30-34 (Esri)
FEM35_FY 	 2023 Female Population Age 35-39 (Esri)
FEM40_FY 	 2023 Female Population Age 40-44 (Esri)
FEM45_FY 	 2023 Female Population Age 45-49 (Esri)
FEM50_FY 	 2023 Female Population Age 50-54 (Esri)
FEM55_FY 	 2023 Female Population Age 55-59 (Esri)
FEM60_FY 	 2023 Female Population Age 60-64 (Esri)
FEM65_FY 	 2023 Female Population Age 65-69 (Esri)
FEM70_FY 	 2023 Female Population Age 70-74 (Esri)
FEM75_FY 	 2023 Female Population Age 75-79 (Esri)
FEM80_FY 	 2023 Female Population Age 80-84 (Esri)
FEM85_FY 	 2023 Female Population Age 85+ (Esri)
FEM18UP_FY 	 2023 Female Population Age 18+ (Esri)
FEM21UP_FY 	 2023 Female Population Age 21+ (Esri)
MEDFAGE_FY 	 2023 Median Female Age (Esri)
AGEBASE_FY 	 2023 Total Population by Five-Year Age Base (Esri)
AGE0_FY 	 2023 Total Population Age <1 (Esri)
AGE1_FY 	 2023 Total Population Age 1 (Esri)
AGE2_FY 	 2023 Total Population Age 2 (Esri)
AGE3_FY 	 2023 Total Population Age 3 (Esri)
AGE4_FY 	 2023 Total Population Age 4 (Esri)
AGE5_FY 	 2023 Total Population Age 5 (Esri)
AGE6_FY 	 2023 Total Population Age 6 (Esri)
AGE7_FY 	 2023 Total Population Age 7 (Esri)
AGE8_FY 	 2023 Total Population Age 8 (Esri)
AGE9_FY 	 2023 Total Population Age 9 (Esri)
AGE10_FY 	 2023 Total Population Age 10 (Esri)
AGE11_FY 	 2023 Total Population Age 11 (Esri)
AGE12_FY 	 2023 Total Population Age 12 (Esri)
AGE13_FY 	 2023 Total Population Age 13 (Esri)
AGE14_FY 	 2023 Total Population Age 14 (Esri)
AGE15_FY 	 2023 Total Population Age 15 (Esri)
AGE16_FY 	 2023 Total Population Age 16 (Esri)
AGE17_FY 	 2023 Total Population Age 17 (Esri)
AGE18_FY 	 2023 Total Population Age 18 (Esri)
AGE19_FY 	 2023 Total Population Age 19 (Esri)
AGE20_FY 	 2023 Total Population Age 20 (Esri)
AGE21_FY 	 2023 Total Population Age 21 (Esri)
AGE22_FY 	 2023 Total Population Age 22 (Esri)
AGE23_FY 	 2023 Total Population Age 23 (Esri)
AGE24_FY 	 2023 Total Population Age 24 (Esri)
AGE25_FY 	 2023 Total Population Age 25 (Esri)
AGE26_FY 	 2023 Total Population Age 26 (Esri)
AGE27_FY 	 2023 Total Population Age 27 (Esri)
AGE28_FY 	 2023 Total Population Age 28 (Esri)
AGE29_FY 	 2023 Total Population Age 29 (Esri)
AGE30_FY 	 2023 Total Population Age 30 (Esri)
AGE31_FY 	 2023 Total Population Age 31 (Esri)
AGE32_FY 	 2023 Total Population Age 32 (Esri)
AGE33_FY 	 2023 Total Population Age 33 (Esri)
AGE34_FY 	 2023 Total Population Age 34 (Esri)
AGE35_FY 	 2023 Total Population Age 35 (Esri)
AGE36_FY 	 2023 Total Population Age 36 (Esri)
AGE37_FY 	 2023 Total Population Age 37 (Esri)
AGE38_FY 	 2023 Total Population Age 38 (Esri)
AGE39_FY 	 2023 Total Population Age 39 (Esri)
AGE40_FY 	 2023 Total Population Age 40 (Esri)
AGE41_FY 	 2023 Total Population Age 41 (Esri)
AGE42_FY 	 2023 Total Population Age 42 (Esri)
AGE43_FY 	 2023 Total Population Age 43 (Esri)
AGE44_FY 	 2023 Total Population Age 44 (Esri)
AGE45_FY 	 2023 Total Population Age 45 (Esri)
AGE46_FY 	 2023 Total Population Age 46 (Esri)
AGE47_FY 	 2023 Total Population Age 47 (Esri)
AGE48_FY 	 2023 Total Population Age 48 (Esri)
AGE49_FY 	 2023 Total Population Age 49 (Esri)
AGE50_FY 	 2023 Total Population Age 50 (Esri)
AGE51_FY 	 2023 Total Population Age 51 (Esri)
AGE52_FY 	 2023 Total Population Age 52 (Esri)
AGE53_FY 	 2023 Total Population Age 53 (Esri)
AGE54_FY 	 2023 Total Population Age 54 (Esri)
AGE55_FY 	 2023 Total Population Age 55 (Esri)
AGE56_FY 	 2023 Total Population Age 56 (Esri)
AGE57_FY 	 2023 Total Population Age 57 (Esri)
AGE58_FY 	 2023 Total Population Age 58 (Esri)
AGE59_FY 	 2023 Total Population Age 59 (Esri)
AGE60_FY 	 2023 Total Population Age 60 (Esri)
AGE61_FY 	 2023 Total Population Age 61 (Esri)
AGE62_FY 	 2023 Total Population Age 62 (Esri)
AGE63_FY 	 2023 Total Population Age 63 (Esri)
AGE64_FY 	 2023 Total Population Age 64 (Esri)
AGE65_FY 	 2023 Total Population Age 65 (Esri)
AGE66_FY 	 2023 Total Population Age 66 (Esri)
AGE67_FY 	 2023 Total Population Age 67 (Esri)
AGE68_FY 	 2023 Total Population Age 68 (Esri)
AGE69_FY 	 2023 Total Population Age 69 (Esri)
AGE70_FY 	 2023 Total Population Age 70 (Esri)
AGE71_FY 	 2023 Total Population Age 71 (Esri)
AGE72_FY 	 2023 Total Population Age 72 (Esri)
AGE73_FY 	 2023 Total Population Age 73 (Esri)
AGE74_FY 	 2023 Total Population Age 74 (Esri)
AGE75_FY 	 2023 Total Population Age 75 (Esri)
AGE76_FY 	 2023 Total Population Age 76 (Esri)
AGE77_FY 	 2023 Total Population Age 77 (Esri)
AGE78_FY 	 2023 Total Population Age 78 (Esri)
AGE79_FY 	 2023 Total Population Age 79 (Esri)
AGE80_FY 	 2023 Total Population Age 80 (Esri)
AGE81_FY 	 2023 Total Population Age 81 (Esri)
AGE82_FY 	 2023 Total Population Age 82 (Esri)
AGE83_FY 	 2023 Total Population Age 83 (Esri)
AGE84_FY 	 2023 Total Population Age 84 (Esri)
MAGE0_FY 	 2023 Male Population Age <1 (Esri)
MAGE1_FY 	 2023 Male Population Age 1 (Esri)
MAGE2_FY 	 2023 Male Population Age 2 (Esri)
MAGE3_FY 	 2023 Male Population Age 3 (Esri)
MAGE4_FY 	 2023 Male Population Age 4 (Esri)
MAGE5_FY 	 2023 Male Population Age 5 (Esri)
MAGE6_FY 	 2023 Male Population Age 6 (Esri)
MAGE7_FY 	 2023 Male Population Age 7 (Esri)
MAGE8_FY 	 2023 Male Population Age 8 (Esri)
MAGE9_FY 	 2023 Male Population Age 9 (Esri)
MAGE10_FY 	 2023 Male Population Age 10 (Esri)
MAGE11_FY 	 2023 Male Population Age 11 (Esri)
MAGE12_FY 	 2023 Male Population Age 12 (Esri)
MAGE13_FY 	 2023 Male Population Age 13 (Esri)
MAGE14_FY 	 2023 Male Population Age 14 (Esri)
MAGE15_FY 	 2023 Male Population Age 15 (Esri)
MAGE16_FY 	 2023 Male Population Age 16 (Esri)
MAGE17_FY 	 2023 Male Population Age 17 (Esri)
MAGE18_FY 	 2023 Male Population Age 18 (Esri)
MAGE19_FY 	 2023 Male Population Age 19 (Esri)
MAGE20_FY 	 2023 Male Population Age 20 (Esri)
MAGE21_FY 	 2023 Male Population Age 21 (Esri)
MAGE22_FY 	 2023 Male Population Age 22 (Esri)
MAGE23_FY 	 2023 Male Population Age 23 (Esri)
MAGE24_FY 	 2023 Male Population Age 24 (Esri)
MAGE25_FY 	 2023 Male Population Age 25 (Esri)
MAGE26_FY 	 2023 Male Population Age 26 (Esri)
MAGE27_FY 	 2023 Male Population Age 27 (Esri)
MAGE28_FY 	 2023 Male Population Age 28 (Esri)
MAGE29_FY 	 2023 Male Population Age 29 (Esri)
MAGE30_FY 	 2023 Male Population Age 30 (Esri)
MAGE31_FY 	 2023 Male Population Age 31 (Esri)
MAGE32_FY 	 2023 Male Population Age 32 (Esri)
MAGE33_FY 	 2023 Male Population Age 33 (Esri)
MAGE34_FY 	 2023 Male Population Age 34 (Esri)
MAGE35_FY 	 2023 Male Population Age 35 (Esri)
MAGE36_FY 	 2023 Male Population Age 36 (Esri)
MAGE37_FY 	 2023 Male Population Age 37 (Esri)
MAGE38_FY 	 2023 Male Population Age 38 (Esri)
MAGE39_FY 	 2023 Male Population Age 39 (Esri)
MAGE40_FY 	 2023 Male Population Age 40 (Esri)
MAGE41_FY 	 2023 Male Population Age 41 (Esri)
MAGE42_FY 	 2023 Male Population Age 42 (Esri)
MAGE43_FY 	 2023 Male Population Age 43 (Esri)
MAGE44_FY 	 2023 Male Population Age 44 (Esri)
MAGE45_FY 	 2023 Male Population Age 45 (Esri)
MAGE46_FY 	 2023 Male Population Age 46 (Esri)
MAGE47_FY 	 2023 Male Population Age 47 (Esri)
MAGE48_FY 	 2023 Male Population Age 48 (Esri)
MAGE49_FY 	 2023 Male Population Age 49 (Esri)
MAGE50_FY 	 2023 Male Population Age 50 (Esri)
MAGE51_FY 	 2023 Male Population Age 51 (Esri)
MAGE52_FY 	 2023 Male Population Age 52 (Esri)
MAGE53_FY 	 2023 Male Population Age 53 (Esri)
MAGE54_FY 	 2023 Male Population Age 54 (Esri)
MAGE55_FY 	 2023 Male Population Age 55 (Esri)
MAGE56_FY 	 2023 Male Population Age 56 (Esri)
MAGE57_FY 	 2023 Male Population Age 57 (Esri)
MAGE58_FY 	 2023 Male Population Age 58 (Esri)
MAGE59_FY 	 2023 Male Population Age 59 (Esri)
MAGE60_FY 	 2023 Male Population Age 60 (Esri)
MAGE61_FY 	 2023 Male Population Age 61 (Esri)
MAGE62_FY 	 2023 Male Population Age 62 (Esri)
MAGE63_FY 	 2023 Male Population Age 63 (Esri)
MAGE64_FY 	 2023 Male Population Age 64 (Esri)
MAGE65_FY 	 2023 Male Population Age 65 (Esri)
MAGE66_FY 	 2023 Male Population Age 66 (Esri)
MAGE67_FY 	 2023 Male Population Age 67 (Esri)
MAGE68_FY 	 2023 Male Population Age 68 (Esri)
MAGE69_FY 	 2023 Male Population Age 69 (Esri)
MAGE70_FY 	 2023 Male Population Age 70 (Esri)
MAGE71_FY 	 2023 Male Population Age 71 (Esri)
MAGE72_FY 	 2023 Male Population Age 72 (Esri)
MAGE73_FY 	 2023 Male Population Age 73 (Esri)
MAGE74_FY 	 2023 Male Population Age 74 (Esri)
MAGE75_FY 	 2023 Male Population Age 75 (Esri)
MAGE76_FY 	 2023 Male Population Age 76 (Esri)
MAGE77_FY 	 2023 Male Population Age 77 (Esri)
MAGE78_FY 	 2023 Male Population Age 78 (Esri)
MAGE79_FY 	 2023 Male Population Age 79 (Esri)
MAGE80_FY 	 2023 Male Population Age 80 (Esri)
MAGE81_FY 	 2023 Male Population Age 81 (Esri)
MAGE82_FY 	 2023 Male Population Age 82 (Esri)
MAGE83_FY 	 2023 Male Population Age 83 (Esri)
MAGE84_FY 	 2023 Male Population Age 84 (Esri)
FAGE0_FY 	 2023 Female Population Age <1 (Esri)
FAGE1_FY 	 2023 Female Population Age 1 (Esri)
FAGE2_FY 	 2023 Female Population Age 2 (Esri)
FAGE3_FY 	 2023 Female Population Age 3 (Esri)
FAGE4_FY 	 2023 Female Population Age 4 (Esri)
FAGE5_FY 	 2023 Female Population Age 5 (Esri)
FAGE6_FY 	 2023 Female Population Age 6 (Esri)
FAGE7_FY 	 2023 Female Population Age 7 (Esri)
FAGE8_FY 	 2023 Female Population Age 8 (Esri)
FAGE9_FY 	 2023 Female Population Age 9 (Esri)
FAGE10_FY 	 2023 Female Population Age 10 (Esri)
FAGE11_FY 	 2023 Female Population Age 11 (Esri)
FAGE12_FY 	 2023 Female Population Age 12 (Esri)
FAGE13_FY 	 2023 Female Population Age 13 (Esri)
FAGE14_FY 	 2023 Female Population Age 14 (Esri)
FAGE15_FY 	 2023 Female Population Age 15 (Esri)
FAGE16_FY 	 2023 Female Population Age 16 (Esri)
FAGE17_FY 	 2023 Female Population Age 17 (Esri)
FAGE18_FY 	 2023 Female Population Age 18 (Esri)
FAGE19_FY 	 2023 Female Population Age 19 (Esri)
FAGE20_FY 	 2023 Female Population Age 20 (Esri)
FAGE21_FY 	 2023 Female Population Age 21 (Esri)
FAGE22_FY 	 2023 Female Population Age 22 (Esri)
FAGE23_FY 	 2023 Female Population Age 23 (Esri)
FAGE24_FY 	 2023 Female Population Age 24 (Esri)
FAGE25_FY 	 2023 Female Population Age 25 (Esri)
FAGE26_FY 	 2023 Female Population Age 26 (Esri)
FAGE27_FY 	 2023 Female Population Age 27 (Esri)
FAGE28_FY 	 2023 Female Population Age 28 (Esri)
FAGE29_FY 	 2023 Female Population Age 29 (Esri)
FAGE30_FY 	 2023 Female Population Age 30 (Esri)
FAGE31_FY 	 2023 Female Population Age 31 (Esri)
FAGE32_FY 	 2023 Female Population Age 32 (Esri)
FAGE33_FY 	 2023 Female Population Age 33 (Esri)
FAGE34_FY 	 2023 Female Population Age 34 (Esri)
FAGE35_FY 	 2023 Female Population Age 35 (Esri)
FAGE36_FY 	 2023 Female Population Age 36 (Esri)
FAGE37_FY 	 2023 Female Population Age 37 (Esri)
FAGE38_FY 	 2023 Female Population Age 38 (Esri)
FAGE39_FY 	 2023 Female Population Age 39 (Esri)
FAGE40_FY 	 2023 Female Population Age 40 (Esri)
FAGE41_FY 	 2023 Female Population Age 41 (Esri)
FAGE42_FY 	 2023 Female Population Age 42 (Esri)
FAGE43_FY 	 2023 Female Population Age 43 (Esri)
FAGE44_FY 	 2023 Female Population Age 44 (Esri)
FAGE45_FY 	 2023 Female Population Age 45 (Esri)
FAGE46_FY 	 2023 Female Population Age 46 (Esri)
FAGE47_FY 	 2023 Female Population Age 47 (Esri)
FAGE48_FY 	 2023 Female Population Age 48 (Esri)
FAGE49_FY 	 2023 Female Population Age 49 (Esri)
FAGE50_FY 	 2023 Female Population Age 50 (Esri)
FAGE51_FY 	 2023 Female Population Age 51 (Esri)
FAGE52_FY 	 2023 Female Population Age 52 (Esri)
FAGE53_FY 	 2023 Female Population Age 53 (Esri)
FAGE54_FY 	 2023 Female Population Age 54 (Esri)
FAGE55_FY 	 2023 Female Population Age 55 (Esri)
FAGE56_FY 	 2023 Female Population Age 56 (Esri)
FAGE57_FY 	 2023 Female Population Age 57 (Esri)
FAGE58_FY 	 2023 Female Population Age 58 (Esri)
FAGE59_FY 	 2023 Female Population Age 59 (Esri)
FAGE60_FY 	 2023 Female Population Age 60 (Esri)
FAGE61_FY 	 2023 Female Population Age 61 (Esri)
FAGE62_FY 	 2023 Female Population Age 62 (Esri)
FAGE63_FY 	 2023 Female Population Age 63 (Esri)
FAGE64_FY 	 2023 Female Population Age 64 (Esri)
FAGE65_FY 	 2023 Female Population Age 65 (Esri)
FAGE66_FY 	 2023 Female Population Age 66 (Esri)
FAGE67_FY 	 2023 Female Population Age 67 (Esri)
FAGE68_FY 	 2023 Female Population Age 68 (Esri)
FAGE69_FY 	 2023 Female Population Age 69 (Esri)
FAGE70_FY 	 2023 Female Population Age 70 (Esri)
FAGE71_FY 	 2023 Female Population Age 71 (Esri)
FAGE72_FY 	 2023 Female Population Age 72 (Esri)
FAGE73_FY 	 2023 Female Population Age 73 (Esri)
FAGE74_FY 	 2023 Female Population Age 74 (Esri)
FAGE75_FY 	 2023 Female Population Age 75 (Esri)
FAGE76_FY 	 2023 Female Population Age 76 (Esri)
FAGE77_FY 	 2023 Female Population Age 77 (Esri)
FAGE78_FY 	 2023 Female Population Age 78 (Esri)
FAGE79_FY 	 2023 Female Population Age 79 (Esri)
FAGE80_FY 	 2023 Female Population Age 80 (Esri)
FAGE81_FY 	 2023 Female Population Age 81 (Esri)
FAGE82_FY 	 2023 Female Population Age 82 (Esri)
FAGE83_FY 	 2023 Female Population Age 83 (Esri)
FAGE84_FY 	 2023 Female Population Age 84 (Esri)
WHITE_FY 	 2023 White Population (Esri)
BLACK_FY 	 2023 Black/African American Population (Esri)
AMERIND_FY 	 2023 American Indian/Alaska Native Population (Esri)
ASIAN_FY 	 2023 Asian Population (Esri)
PACIFIC_FY 	 2023 Pacific Islander Population (Esri)
OTHRACE_FY 	 2023 Other Race Population (Esri)
RACE2UP_FY 	 2023 Population of Two or More Races (Esri)
HISPPOP_FY 	 2023 Hispanic Population (Esri)
HISPWHT_FY 	 2023 Hispanic White Population (Esri)
HISPBLK_FY 	 2023 Hispanic Black/African American Population (Esri)
HISPAI_FY 	 2023 Hispanic American Indian/Alaska Native Population (Esri)
HISPASN_FY 	 2023 Hispanic Asian Population (Esri)
HISPPI_FY 	 2023 Hispanic Pacific Islander Population (Esri)
HISPOTH_FY 	 2023 Hispanic Other Race Population (Esri)
HISPMLT_FY 	 2023 Hispanic Population of Two or More Races (Esri)
NONHISP_FY 	 2023 Non-Hispanic Population (Esri)
NHSPWHT_FY 	 2023 White Non-Hispanic Population (Esri)
NHSPBLK_FY 	 2023 Black/African American Non-Hispanic Population (Esri)
NHSPAI_FY 	 2023 American Indian/Alaska Native Non-Hispanic Population (Esri)
NHSPASN_FY 	 2023 Asian Non-Hispanic Population (Esri)
NHSPPI_FY 	 2023 Pacific Islander Non-Hispanic Population (Esri)
NHSPOTH_FY 	 2023 Other Race Non-Hispanic Population (Esri)
NHSPMLT_FY 	 2023 Multiple Races Non-Hispanic Population (Esri)
MINORITYFY 	 2023 Minority Population (Esri)
DIVINDX_FY 	 2023 Diversity Index (Esri)
RACEBASEFY 	 2023 Population by Race Base (Esri)
HINC0_FY 	 2023 Household Income less than $15,000 (Esri)
HINC15_FY 	 2023 Household Income $15,000-$24,999 (Esri)
HINC25_FY 	 2023 Household Income $25,000-$34,999 (Esri)
HINC35_FY 	 2023 Household Income $35,000-$49,999 (Esri)
HINC50_FY 	 2023 Household Income $50,000-$74,999 (Esri)
HINC75_FY 	 2023 Household Income $75,000-$99,999 (Esri)
HINC100_FY 	 2023 Household Income $100,000-$149,999 (Esri)
HINC150_FY 	 2023 Household Income $150,000-$199,999 (Esri)
HINC200_FY 	 2023 Household Income $200,000 or greater (Esri)
MEDHINC_FY 	 2023 Median Household Income (Esri)
AVGHINC_FY 	 2023 Average Household Income (Esri)
PCI_FY 	 2023 Per Capita Income (Esri)
AGGINC_FY 	 2023 Aggregate Income (Esri)
AGGHINC_FY 	 2023 Aggregate Household Income (Esri)
HINCBASEFY 	 2023 Households by Income Base (Esri)
A15I0_FY 	 2023 Household Income less than $15,000 and Householder Age 15-24 (Esri)
A15I15_FY 	 2023 Household Income $15,000-$24,999 and Householder Age 15-24 (Esri)
A15I25_FY 	 2023 Household Income $25,000-$34,999 and Householder Age 15-24 (Esri)
A15I35_FY 	 2023 Household Income $35,000-$49,999 and Householder Age 15-24 (Esri)
A15I50_FY 	 2023 Household Income $50,000-$74,999 and Householder Age 15-24 (Esri)
A15I75_FY 	 2023 Household Income $75,000-$99,999 and Householder Age 15-24 (Esri)
A15I100_FY 	 2023 Household Income $100,000-$149,999 and Householder Age 15-24 (Esri)
A15I150_FY 	 2023 Household Income $150,000-$199,999 and Householder Age 15-24 (Esri)
A15I200_FY 	 2023 Household Income $200,000+ and Householder Age 15-24 (Esri)
MEDIA15_FY 	 2023 Median Household Income and Householder Age 15-24 (Esri)
AVGIA15_FY 	 2023 Average Household Income and Householder Age 15-24 (Esri)
IA15BASEFY 	 2023 Households by Income Base and Householder Age 15-24 (Esri)
AGGIA15_FY 	 2023 Aggregate Household Income and Householder Age 15-24 (Esri)
A25I0_FY 	 2023 Household Income less than $15,000 and Householder Age 25-34 (Esri)
A25I15_FY 	 2023 Household Income $15,000-$24,999 and Householder Age 25-34 (Esri)
A25I25_FY 	 2023 Household Income $25,000-$34,999 and Householder Age 25-34 (Esri)
A25I35_FY 	 2023 Household Income $35,000-$49,999 and Householder Age 25-34 (Esri)
A25I50_FY 	 2023 Household Income $50,000-$74,999 and Householder Age 25-34 (Esri)
A25I75_FY 	 2023 Household Income $75,000-$99,999 and Householder Age 25-34 (Esri)
A25I100_FY 	 2023 Household Income $100,000-$149,999 and Householder Age 25-34 (Esri)
A25I150_FY 	 2023 Household Income $150,000-$199,999 and Householder Age 25-34 (Esri)
A25I200_FY 	 2023 Household Income $200,000+ and Householder Age 25-34 (Esri)
MEDIA25_FY 	 2023 Median Household Income and Householder Age 25-34 (Esri)
AVGIA25_FY 	 2023 Average Household Income and Householder Age 25-34 (Esri)
IA25BASEFY 	 2023 Households by Income Base and Householder Age 25-34 (Esri)
AGGIA25_FY 	 2023 Aggregate Household Income and Householder Age 25-34 (Esri)
A35I0_FY 	 2023 Household Income less than $15,000 and Householder Age 35-44 (Esri)
A35I15_FY 	 2023 Household Income $15,000-$24,999 and Householder Age 35-44 (Esri)
A35I25_FY 	 2023 Household Income $25,000-$34,999 and Householder Age 35-44 (Esri)
A35I35_FY 	 2023 Household Income $35,000-$49,999 and Householder Age 35-44 (Esri)
A35I50_FY 	 2023 Household Income $50,000-$74,999 and Householder Age 35-44 (Esri)
A35I75_FY 	 2023 Household Income $75,000-$99,999 and Householder Age 35-44 (Esri)
A35I100_FY 	 2023 Household Income $100,000-$149,999 and Householder Age 35-44 (Esri)
A35I150_FY 	 2023 Household Income $150,000-$199,999 and Householder Age 35-44 (Esri)
A35I200_FY 	 2023 Household Income $200,000+ and Householder Age 35-44 (Esri)
MEDIA35_FY 	 2023 Median Household Income and Householder Age 35-44 (Esri)
AVGIA35_FY 	 2023 Average Household Income and Householder Age 35-44 (Esri)
IA35BASEFY 	 2023 Households by Income Base and Householder Age 35-44 (Esri)
AGGIA35_FY 	 2023 Aggregate Household Income and Householder Age 35-44 (Esri)
A45I0_FY 	 2023 Household Income less than $15,000 and Householder Age 45-54 (Esri)
A45I15_FY 	 2023 Household Income $15,000-$24,999 and Householder Age 45-54 (Esri)
A45I25_FY 	 2023 Household Income $25,000-$34,999 and Householder Age 45-54 (Esri)
A45I35_FY 	 2023 Household Income $35,000-$49,999 and Householder Age 45-54 (Esri)
A45I50_FY 	 2023 Household Income $50,000-$74,999 and Householder Age 45-54 (Esri)
A45I75_FY 	 2023 Household Income $75,000-$99,999 and Householder Age 45-54 (Esri)
A45I100_FY 	 2023 Household Income $100,000-$149,999 and Householder Age 45-54 (Esri)
A45I150_FY 	 2023 Household Income $150,000-$199,999 and Householder Age 45-54 (Esri)
A45I200_FY 	 2023 Household Income $200,000+ and Householder Age 45-54 (Esri)
MEDIA45_FY 	 2023 Median Household Income and Householder Age 45-54 (Esri)
AVGIA45_FY 	 2023 Average Household Income and Householder Age 45-54 (Esri)
IA45BASEFY 	 2023 Households by Income Base and Householder Age 45-54 (Esri)
AGGIA45_FY 	 2023 Aggregate Household Income and Householder Age 45-54 (Esri)
A55I0_FY 	 2023 Household Income less than $15,000 and Householder Age 55-64 (Esri)
A55I15_FY 	 2023 Household Income $15,000-$24,999 and Householder Age 55-64 (Esri)
A55I25_FY 	 2023 Household Income $25,000-$34,999 and Householder Age 55-64 (Esri)
A55I35_FY 	 2023 Household Income $35,000-$49,999 and Householder Age 55-64 (Esri)
A55I50_FY 	 2023 Household Income $50,000-$74,999 and Householder Age 55-64 (Esri)
A55I75_FY 	 2023 Household Income $75,000-$99,999 and Householder Age 55-64 (Esri)
A55I100_FY 	 2023 Household Income $100,000-$149,999 and Householder Age 55-64 (Esri)
A55I150_FY 	 2023 Household Income $150,000-$199,999 and Householder Age 55-64 (Esri)
A55I200_FY 	 2023 Household Income $200,000+ and Householder Age 55-64 (Esri)
MEDIA55_FY 	 2023 Median Household Income and Householder Age 55-64 (Esri)
AVGIA55_FY 	 2023 Average Household Income and Householder Age 55-64 (Esri)
IA55BASEFY 	 2023 Households by Income Base and Householder Age 55-64 (Esri)
AGGIA55_FY 	 2023 Aggregate Household Income and Householder Age 55-64 (Esri)
A65I0_FY 	 2023 Household Income less than $15,000 and Householder Age 65-74 (Esri)
A65I15_FY 	 2023 Household Income $15,000-$24,999 and Householder Age 65-74 (Esri)
A65I25_FY 	 2023 Household Income $25,000-$34,999 and Householder Age 65-74 (Esri)
A65I35_FY 	 2023 Household Income $35,000-$49,999 and Householder Age 65-74 (Esri)
A65I50_FY 	 2023 Household Income $50,000-$74,999 and Householder Age 65-74 (Esri)
A65I75_FY 	 2023 Household Income $75,000-$99,999 and Householder Age 65-74 (Esri)
A65I100_FY 	 2023 Household Income $100,000-$149,999 and Householder Age 65-74 (Esri)
A65I150_FY 	 2023 Household Income $150,000-$199,999 and Householder Age 65-74 (Esri)
A65I200_FY 	 2023 Household Income $200,000+ and Householder Age 65-74 (Esri)
MEDIA65_FY 	 2023 Median Household Income and Householder Age 65-74 (Esri)
AVGIA65_FY 	 2023 Average Household Income and Householder Age 65-74 (Esri)
IA65BASEFY 	 2023 Households by Income Base and Householder Age 65-74 (Esri)
AGGIA65_FY 	 2023 Aggregate Household Income and Householder Age 65-74 (Esri)
A75I0_FY 	 2023 Household Income less than $15,000 and Householder Age 75+ (Esri)
A75I15_FY 	 2023 Household Income $15,000-$24,999 and Householder Age 75+ (Esri)
A75I25_FY 	 2023 Household Income $25,000-$34,999 and Householder Age 75+ (Esri)
A75I35_FY 	 2023 Household Income $35,000-$49,999 and Householder Age 75+ (Esri)
A75I50_FY 	 2023 Household Income $50,000-$74,999 and Householder Age 75+ (Esri)
A75I75_FY 	 2023 Household Income $75,000-$99,999 and Householder Age 75+ (Esri)
A75I100_FY 	 2023 Household Income $100,000-$149,999 and Householder Age 75+ (Esri)
A75I150_FY 	 2023 Household Income $150,000-$199,999 and Householder Age 75+ (Esri)
A75I200_FY 	 2023 Household Income $200,000+ and Householder Age 75+ (Esri)
MEDIA75_FY 	 2023 Median Household Income and Householder Age 75+ (Esri)
AVGIA75_FY 	 2023 Average Household Income and Householder Age 75+ (Esri)
IA75BASEFY 	 2023 Households by Income Base and Householder Age 75+ (Esri)
AGGIA75_FY 	 2023 Aggregate Household Income and Householder Age 75+ (Esri)
MEDHHR_FY 	 2023 Median Age of Householder (Esri)
MEDIA55UFY 	 2023 Median Household Income and Householder Age 55+ (Esri)
AVGIA55UFY 	 2023 Average Household Income and Householder Age 55+ (Esri)
IA55UBASFY 	 2023 Households by Income Base and Householder Age 55+ (Esri)
MEDIA65UFY 	 2023 Median Household Income and Householder Age 65+ (Esri)
AVGIA65UFY 	 2023 Average Household Income and Householder Age 65+ (Esri)
IA65UBASFY 	 2023 Households by Income Base and Householder Age 65+ (Esri)
VAL0_FY 	 2023 Home Value less than $50,000 (Esri)
VAL50K_FY 	 2023 Home Value $50,000-$99,999 (Esri)
VAL100K_FY 	 2023 Home Value $100,000-$149,999 (Esri)
VAL150K_FY 	 2023 Home Value $150,000-$199,999 (Esri)
VAL200K_FY 	 2023 Home Value $200,000-$249,999 (Esri)
VAL250K_FY 	 2023 Home Value $250,000-$299,999 (Esri)
VAL300K_FY 	 2023 Home Value $300,000-$399,999 (Esri)
VAL400K_FY 	 2023 Home Value $400,000-$499,999 (Esri)
VAL500K_FY 	 2023 Home Value $500,000-$749,999 (Esri)
VAL750K_FY 	 2023 Home Value $750,000-$999,999 (Esri)
VAL1M_FY 	 2023 Home Value $1,000,000-$1,499,999 (Esri)
VAL1PT5MFY 	 2023 Home Value $1,500,000-$1,999,999 (Esri)
VAL2M_FY 	 2023 Home Value $2,000,000 or greater (Esri)
MEDVAL_FY 	 2023 Median Home Value (Esri)
AVGVAL_FY 	 2023 Average Home Value (Esri)
VALBASE_FY 	 2023 Owner Occupied Housing Units by Value Base (Esri)
TOTPOP10 	 2010 Total Population (U.S. Census)
POPDENS10 	 2010 Population Density (Pop per Square Mile) (U.S. Census)
MALES10 	 2010 Male Population (U.S. Census)
FEMALES10 	 2010 Female Population (U.S. Census)
HHPOP10 	 2010 Population in Households (U.S. Census)
FAMPOP10 	 2010 Population in Families (U.S. Census)
POPGRW0010 	 2000-2010 Population Annual Compound Growth Rate (U.S. Census)
URBARPOP10 	 2010 Population Inside Urbanized Areas (U.S. Census)
URBCLPOP10 	 2010 Population Inside Urban Clusters (U.S. Census)
RURALPOP10 	 2010 Rural Population (U.S. Census)
URBANPOP10 	 2010 Urban Population (U.S. Census)
URPOPBAS10 	 2010 Urban/Rural Population Base (U.S. Census)
POP0C10 	 2010 Total Population Age 0-4 (U.S. Census)
POP5C10 	 2010 Total Population Age 5-9  (U.S. Census)
POP10C10 	 2010 Total Population Age 10-14  (U.S. Census)
POP15C10 	 2010 Total Population Age 15-19  (U.S. Census)
POP20C10 	 2010 Total Population Age 20-24  (U.S. Census)
POP25C10 	 2010 Total Population Age 25-29  (U.S. Census)
POP30C10 	 2010 Total Population Age 30-34  (U.S. Census)
POP35C10 	 2010 Total Population Age 35-39  (U.S. Census)
POP40C10 	 2010 Total Population Age 40-44  (U.S. Census)
POP45C10 	 2010 Total Population Age 45-49  (U.S. Census)
POP50C10 	 2010 Total Population Age 50-54  (U.S. Census)
POP55C10 	 2010 Total Population Age 55-59  (U.S. Census)
POP60C10 	 2010 Total Population Age 60-64  (U.S. Census)
POP65C10 	 2010 Total Population Age 65-69  (U.S. Census)
POP70C10 	 2010 Total Population Age 70-74  (U.S. Census)
POP75C10 	 2010 Total Population Age 75-79  (U.S. Census)
POP80C10 	 2010 Total Population Age 80-84  (U.S. Census)
POP85C10 	 2010 Total Population Age 85+ (U.S. Census)
ADULTS10 	 2010 Population Age 18+ (U.S. Census)
POP21UP10 	 2010 Total Population Age 21+ (U.S. Census)
MEDAGE10 	 2010 Median Age (U.S. Census)
AGEBASE10 	 2010 Base for Total Population by 5-Year Age Ranges (U.S. Census)
MALE0C10 	 2010 Males Age 0-4 (U.S. Census)
MALE5C10 	 2010 Males Age 5-9 (U.S. Census)
MALE10C10 	 2010 Males Age 10-14 (U.S. Census)
MALE15C10 	 2010 Males Age 15-19 (U.S. Census)
MALE20C10 	 2010 Males Age 20-24 (U.S. Census)
MALE25C10 	 2010 Males Age 25-29 (U.S. Census)
MALE30C10 	 2010 Males Age 30-34 (U.S. Census)
MALE35C10 	 2010 Males Age 35-39 (U.S. Census)
MALE40C10 	 2010 Males Age 40-44 (U.S. Census)
MALE45C10 	 2010 Males Age 45-49 (U.S. Census)
MALE50C10 	 2010 Males Age 50-54 (U.S. Census)
MALE55C10 	 2010 Males Age 55-59 (U.S. Census)
MALE60C10 	 2010 Males Age 60-64 (U.S. Census)
MALE65C10 	 2010 Males Age 65-69 (U.S. Census)
MALE70C10 	 2010 Males Age 70-74 (U.S. Census)
MALE75C10 	 2010 Males Age 75-79 (U.S. Census)
MALE80C10 	 2010 Males Age 80-84 (U.S. Census)
MALE85C10 	 2010 Males Age 85+ (U.S. Census)
MAL18UP10 	 2010 Males Age 18+ (U.S. Census)
MAL21UP10 	 2010 Males Age 21+ (U.S. Census)
MEDMAGE10 	 2010 Median Male Age (U.S. Census)
MAGEBASE10 	 2010 Base for Male Population by 5-Year Age Ranges (U.S. Census)
FEM0C10 	 2010 Females Age 0-4 (U.S. Census)
FEM5C10 	 2010 Females Age 5-9 (U.S. Census)
FEM10C10 	 2010 Females Age 10-14 (U.S. Census)
FEM15C10 	 2010 Females Age 15-19 (U.S. Census)
FEM20C10 	 2010 Females Age 20-24 (U.S. Census)
FEM25C10 	 2010 Females Age 25-29 (U.S. Census)
FEM30C10 	 2010 Females Age 30-34 (U.S. Census)
FEM35C10 	 2010 Females Age 35-39 (U.S. Census)
FEM40C10 	 2010 Females Age 40-44 (U.S. Census)
FEM45C10 	 2010 Females Age 45-49 (U.S. Census)
FEM50C10 	 2010 Females Age 50-54 (U.S. Census)
FEM55C10 	 2010 Females Age 55-59 (U.S. Census)
FEM60C10 	 2010 Females Age 60-64 (U.S. Census)
FEM65C10 	 2010 Females Age 65-69 (U.S. Census)
FEM70C10 	 2010 Females Age 70-74 (U.S. Census)
FEM75C10 	 2010 Females Age 75-79 (U.S. Census)
FEM80C10 	 2010 Females Age 80-84 (U.S. Census)
FEM85C10 	 2010 Females Age 85+ (U.S. Census)
FEM18UP10 	 2010 Females Age 18+ (U.S. Census)
FEM21UP10 	 2010 Females Age 21+ (U.S. Census)
MEDFAGE10 	 2010 Median Female Age (U.S. Census)
FAGEBASE10 	 2010 Base for Female Population by 5-Year Age Ranges (U.S. Census)
AGE0C10 	 2010 Total Population Age <1 (U.S. Census)
AGE1C10 	 2010 Total Population Age 1 (U.S. Census)
AGE2C10 	 2010 Total Population Age 2 (U.S. Census)
AGE3C10 	 2010 Total Population Age 3 (U.S. Census)
AGE4C10 	 2010 Total Population Age 4 (U.S. Census)
AGE5C10 	 2010 Total Population Age 5 (U.S. Census)
AGE6C10 	 2010 Total Population Age 6 (U.S. Census)
AGE7C10 	 2010 Total Population Age 7 (U.S. Census)
AGE8C10 	 2010 Total Population Age 8 (U.S. Census)
AGE9C10 	 2010 Total Population Age 9 (U.S. Census)
AGE10C10 	 2010 Total Population Age 10 (U.S. Census)
AGE11C10 	 2010 Total Population Age 11 (U.S. Census)
AGE12C10 	 2010 Total Population Age 12 (U.S. Census)
AGE13C10 	 2010 Total Population Age 13 (U.S. Census)
AGE14C10 	 2010 Total Population Age 14 (U.S. Census)
AGE15C10 	 2010 Total Population Age 15 (U.S. Census)
AGE16C10 	 2010 Total Population Age 16 (U.S. Census)
AGE17C10 	 2010 Total Population Age 17 (U.S. Census)
AGE18C10 	 2010 Total Population Age 18 (U.S. Census)
AGE19C10 	 2010 Total Population Age 19 (U.S. Census)
AGE20C10 	 2010 Total Population Age 20 (U.S. Census)
AGE21C10 	 2010 Total Population Age 21 (U.S. Census)
MAGE0C10 	 2010 Males Age <1 (U.S. Census)
MAGE1C10 	 2010 Males Age 1 (U.S. Census)
MAGE2C10 	 2010 Males Age 2 (U.S. Census)
MAGE3C10 	 2010 Males Age 3 (U.S. Census)
MAGE4C10 	 2010 Males Age 4 (U.S. Census)
MAGE5C10 	 2010 Males Age 5 (U.S. Census)
MAGE6C10 	 2010 Males Age 6 (U.S. Census)
MAGE7C10 	 2010 Males Age 7 (U.S. Census)
MAGE8C10 	 2010 Males Age 8 (U.S. Census)
MAGE9C10 	 2010 Males Age 9 (U.S. Census)
MAGE10C10 	 2010 Males Age 10 (U.S. Census)
MAGE11C10 	 2010 Males Age 11 (U.S. Census)
MAGE12C10 	 2010 Males Age 12 (U.S. Census)
MAGE13C10 	 2010 Males Age 13 (U.S. Census)
MAGE14C10 	 2010 Males Age 14 (U.S. Census)
MAGE15C10 	 2010 Males Age 15 (U.S. Census)
MAGE16C10 	 2010 Males Age 16 (U.S. Census)
MAGE17C10 	 2010 Males Age 17 (U.S. Census)
MAGE18C10 	 2010 Males Age 18 (U.S. Census)
MAGE19C10 	 2010 Males Age 19 (U.S. Census)
MAGE20C10 	 2010 Males Age 20 (U.S. Census)
MAGE21C10 	 2010 Males Age 21 (U.S. Census)
FAGE0C10 	 2010 Females Age <1 (U.S. Census)
FAGE1C10 	 2010 Females Age 1 (U.S. Census)
FAGE2C10 	 2010 Females Age 2 (U.S. Census)
FAGE3C10 	 2010 Females Age 3 (U.S. Census)
FAGE4C10 	 2010 Females Age 4 (U.S. Census)
FAGE5C10 	 2010 Females Age 5 (U.S. Census)
FAGE6C10 	 2010 Females Age 6 (U.S. Census)
FAGE7C10 	 2010 Females Age 7 (U.S. Census)
FAGE8C10 	 2010 Females Age 8 (U.S. Census)
FAGE9C10 	 2010 Females Age 9 (U.S. Census)
FAGE10C10 	 2010 Females Age 10 (U.S. Census)
FAGE11C10 	 2010 Females Age 11 (U.S. Census)
FAGE12C10 	 2010 Females Age 12 (U.S. Census)
FAGE13C10 	 2010 Females Age 13 (U.S. Census)
FAGE14C10 	 2010 Females Age 14 (U.S. Census)
FAGE15C10 	 2010 Females Age 15 (U.S. Census)
FAGE16C10 	 2010 Females Age 16 (U.S. Census)
FAGE17C10 	 2010 Females Age 17 (U.S. Census)
FAGE18C10 	 2010 Females Age 18 (U.S. Census)
FAGE19C10 	 2010 Females Age 19 (U.S. Census)
FAGE20C10 	 2010 Females Age 20 (U.S. Census)
FAGE21C10 	 2010 Females Age 21 (U.S. Census)
WHITE10 	 2010 White Population (U.S. Census)
BLACK10 	 2010 Black/African American Population (U.S. Census)
AMERIND10 	 2010 American Indian/Alaska Native Population (U.S. Census)
ASIAN10 	 2010 Asian Population (U.S. Census)
PACIFIC10 	 2010 Pacific Islander Population (U.S. Census)
OTHRACE10 	 2010 Other Race Population (U.S. Census)
H1RACE10 	 2010 Hispanic Population Reporting One Race (U.S. Census)
RACE2UP10 	 2010 Population of Two or More Races (U.S. Census)
HISPPOP10 	 2010 Hispanic Population (U.S. Census)
HWHITE10 	 2010 Hispanic White Population (U.S. Census)
HBLACK10 	 2010 Hispanic Black/African American Population (U.S. Census)
HAMERIND10 	 2010 Hispanic American Indian/Alaska Native Population (U.S. Census)
HASIAN10 	 2010 Hispanic Asian Population (U.S. Census)
HPACIFIC10 	 2010 Hispanic Pacific Islander Population (U.S. Census)
HOTHRACE10 	 2010 Hispanic Other Race Population (U.S. Census)
HRACE2UP10 	 2010 Hispanic Population Reporting Two or More Races (U.S. Census)
WHTNHISP10 	 2010 White Non-Hispanic Population (U.S. Census)
MINORITY10 	 2010 Minority Population (U.S. Census)
DIVINDX10 	 2010 Diversity Index (U.S. Census)
HPWHTHHR10 	 2010 Population Living in Households with a White Householder (U.S. Census)
HPBLKHHR10 	 2010 Population Living in Households with a Black/African American Householder (U.S. Census)
HPAIHHR10 	 2010 Population Living in Households with an American Indian/Alaska Native Householder (U.S. Census)
HPASNHHR10 	 2010 Population Living in Households with an Asian Householder (U.S. Census)
HPPIHHR10 	 2010 Population Living in Households with a Pacific Islander Householder (U.S. Census)
HPOTHHHR10 	 2010 Population Living in Households with an Other Race Householder (U.S. Census)
HPMLTHHR10 	 2010 Population Living in Households with a Multiple Races Householder (U.S. Census)
HPHSPHHR10 	 2010 Population Living in Households with a Hispanic Householder (U.S. Census)
HRACEBAS10 	 2010 Base for Hispanic Population by Race (U.S. Census)
RACEBASE10 	 2010 Base for Population by Race (U.S. Census)
POP1RACE10 	 2010 Population Reporting One Race (U.S. Census)
U18RBASE10 	 2010 Base for Population <18 by Race (U.S. Census)
ADRACBAS10 	 2010 Base for Population Age 18+ by Race (U.S. Census)
AD1RACE10 	 2010 Population Age 18+ Reporting One Race (U.S. Census)
HADRBASE10 	 2010 Base for Hispanic Population Age 18+ by Race (U.S. Census)
HAD1RACE10 	 2010 Hispanic Population Age 18+ Reporting One Race (U.S. Census)
MALHHRFH10 	 2010 Male Householder Living in Family Households (U.S. Census)
FEMHHRFH10 	 2010 Female Householder Living in Family Households (U.S. Census)
SPOUSEFH10 	 2010 Spouse Living in Family Households (U.S. Census)
BIOLCHFH10 	 2010 Biological Child Living in Family Households (U.S. Census)
ADPTCHFH10 	 2010 Adopted Child Living in Family Households (U.S. Census)
STEPCHFH10 	 2010 Stepchild Living in Family Households (U.S. Census)
GRNDCHFH10 	 2010 Grandchild Living in Family Households (U.S. Census)
BROSISFH10 	 2010 Brother or Sister Living in Family Households (U.S. Census)
PARENTFH10 	 2010 Parent Living in Family Households (U.S. Census)
PINLAWFH10 	 2010 Parent-in-law Living in Family Households (U.S. Census)
SDINLAWF10 	 2010 Son-in-law or Daughter-in-law Living in Family Households (U.S. Census)
OTHRELFH10 	 2010 Other Relative Living in Family Households (U.S. Census)
NONRELFH10 	 2010 Nonrelative Living in Family Households (U.S. Census)
MHHR1NF10 	 2010 Male Householder Living Alone in Nonfamily Households (U.S. Census)
MHHR2NF10 	 2010 Male Householder Not Living Alone in Nonfamily Households (U.S. Census)
FHHR1NF10 	 2010 Female Householder Living Alone in Nonfamily Households (U.S. Census)
FHHR2NF10 	 2010 Female Householder Not Living Alone in Nonfamily Households (U.S. Census)
NONRELNF10 	 2010 Nonrelative Living in Nonfamily Households (U.S. Census)
P65FAMHH10 	 2010 Population Age 65+ Living in Family Households (U.S. Census)
P65MHHRF10 	 2010 Male Householder Age 65+ Living in Family Households (U.S. Census)
P65FHHRF10 	 2010 Female Householder Age 65+ Living in Family Households (U.S. Census)
P65SPOUS10 	 2010 Spouse Age 65+ Living in Family Households (U.S. Census)
P65PARNT10 	 2010 Parent Age 65+ Living in Family Households (U.S. Census)
P65PINLW10 	 2010 Parent-in-law Age 65+ Living in Family Households (U.S. Census)
P65OREL10 	 2010 Other Relative Age 65+ Living in Family Households (U.S. Census)
P65NRELF10 	 2010 Nonrelative Age 65+ Living in Family Households (U.S. Census)
P65NFHH10 	 2010 Population Age 65+ Living in Nonfamily Households (U.S. Census)
P65MH1NF10 	 2010 Male Householder Age 65+ Living Alone in Nonfamily Households (U.S. Census)
P65MH2NF10 	 2010 Male Householder Age 65+ Not Living Alone in Nonfamily Households (U.S. Census)
P65FH1NF10 	 2010 Female Householder Age 65+ Living Alone in Nonfamily Households (U.S. Census)
P65FH2NF10 	 2010 Female Householder Age 65+ Not Living Alone in Nonfamily Households (U.S. Census)
P65NRLNF10 	 2010 Nonrelative Age 65+ Living in Nonfamily Households (U.S. Census)
GQPOP10 	 2010 Population in Group Quarters (U.S. Census)
GQINST10 	 2010 Institutionalized Population in Group Quarters (U.S. Census)
GQPRISON10 	 2010 Institutionalized Population in Adult Correctional Facilities (U.S. Census)
GQJUV10 	 2010 Institutionalized Population in Juvenile Facilities (U.S. Census)
GQNURS10 	 2010 Institutionalized Population in Nursing Facilities (U.S. Census)
GQOTINST10 	 2010 Institutionalized Population in Other Institutional (U.S. Census)
GQNINST10 	 2010 Noninstitutionalized Population in Group Quarters (U.S. Census)
GQCOLL10 	 2010 Noninstitutionalized Population in College Student Housing (U.S. Census)
GQMIL10 	 2010 Noninstitutionalized Population in Military Quarters (U.S. Census)
GQONINST10 	 2010 Noninstitutionalized Population in Other Noninstitutional (U.S. Census)
POPU18GQ10 	 2010 Population Age <18 in Group Quarters (U.S. Census)
U18INST10 	 2010 Institutionalized Population Age <18 in Group Quarters (U.S. Census)
U18NINST10 	 2010 Noninstitutionalized Population Age <18 in Group Quarters (U.S. Census)
POP65GQ10 	 2010 Population Age 65+ in Group Quarters (U.S. Census)
P65INST10 	 2010 Institutionalized Population Age 65+ in Group Quarters (U.S. Census)
P65NINST10 	 2010 Noninstitutionalized Population Age 65+ in Group Quarters:  (U.S. Census)
TOTHH10 	 2010 Total Households (U.S. Census)
HHU18C10 	 2010 Households with Population Age <18 (U.S. Census)
MLTGENHH10 	 2010 Multigenerational Households (Three or More Generations) (U.S. Census)
UNMARRMF10 	 2010 Unmarried-partner Households: Male and Female (U.S. Census)
UNMARRSS10 	 2010 Unmarried-partner Households: Same Sex (U.S. Census)
FAMSENR10 	 2010 Family Households with Population Age 65+ (U.S. Census)
HHGRW0010 	 2000-2010 Households Annual Compound Growth Rate (U.S. Census)
FAMGRW0010 	 2000-2010 Families Annual Compound Growth Rate (U.S. Census)
FAMHH10 	 2010 Total Family Households (U.S. Census)
HWFAMHH10 	 2010 Husband-wife Family Households (U.S. Census)
OTHFAMHH10 	 2010 Other Family Households (U.S. Census)
OFAMMHHR10 	 2010 Other Family Households with a Male Householder (U.S. Census)
OFAMFHHR10 	 2010 Other Family Households with a Female Householder (U.S. Census)
NONFAMHH10 	 2010 Total Nonfamily Households (U.S. Census)
NONFAM1P10 	 2010 Nonfamily Households with a Householder Living Alone (U.S. Census)
NF2PMHHR10 	 2010 Nonfamily 2+ Person Households with a Male Householder (U.S. Census)
NF2PFHHR10 	 2010 Nonfamily 2+ Person Households with a Female Householder (U.S. Census)
POPFAMHH10 	 2010 Population Living in Family Households (U.S. Census)
POPHWFAM10 	 2010 Population Living in Husband-wife Family Households (U.S. Census)
POPOFAMM10 	 2010 Population Living in Other Family Households with a Male Householder and No Spouse (U.S. Census)
POPOFAMF10 	 2010 Population Living in Other Family Households with a Female Householder and No Spouse (U.S. Census)
POPNFHH10 	 2010 Total Population Living in Nonfamily Households (U.S. Census)
POP1PNF10 	 2010 Population Living Alone in Nonfamily Households (U.S. Census)
POP2PNFM10 	 2010 Population Not Living Alone in Nonfamily Households with a Male Householder (U.S. Census)
POP2PNFF10 	 2010 Population Not Living Alone in Nonfamily Households with a Female Householder (U.S. Census)
AVGHHSZ10 	 2010 Average Household Size (U.S. Census)
AVGHSZOO10 	 2010 Average Household Size of Owner-occupied Housing Units (U.S. Census)
AVGHSZRO10 	 2010 Average Household Size of Renter-occupied Housing Units (U.S. Census)
AVGFMSZ10 	 2010 Average Family Size (U.S. Census)
AVGNFMSZ10 	 2010 Average Nonfamily Size (U.S. Census)
AVGHSZWH10 	 2010 Average Household Size of Households with a White Householder (U.S. Census)
AVGHSZBL10 	 2010 Average Household Size of Households with a Black/African American Householder (U.S. Census)
AVGHSZAI10 	 2010 Average Household Size of Households with an American Indian/Alaska Native Householder (U.S. Census)
AVGHSZAS10 	 2010 Average Household Size of Households with an Asian Householder (U.S. Census)
AVGHSZPI10 	 2010 Average Household Size of Households with a Pacific Islander Householder (U.S. Census)
AVGHSZOT10 	 2010 Average Household Size of Households with an Other Race Householder (U.S. Census)
AVGHSZ2R10 	 2010 Average Household Size of Households with a Multiple Races Householder (U.S. Census)
AVGHSZHS10 	 2010 Average Household Size of Households with a Hispanic Householder (U.S. Census)
FMSZBASE10 	 2010 Base for Family Households by Size (U.S. Census)
HHWHTHHR10 	 2010 Households with a White Householder (U.S. Census)
HHBLKHHR10 	 2010 Households with a Black/African American Householder (U.S. Census)
HHAIHHR10 	 2010 Households with an American Indian/Alaska Native Householder (U.S. Census)
HHASNHHR10 	 2010 Households with an Asian Householder (U.S. Census)
HHPIHHR10 	 2010 Households with a Pacific Islander Householder (U.S. Census)
HHOTHHHR10 	 2010 Households with an Other Race Householder (U.S. Census)
HHMLTHHR10 	 2010 Households with a Multiple Races Householder (U.S. Census)
HHHSPHHR10 	 2010 Households with a Hispanic Householder (U.S. Census)
FAMHHWHT10 	 2010 Family Households with a White Householder (U.S. Census)
FAMHHBLK10 	 2010 Family Households with a Black/African American Householder (U.S. Census)
FAMHHAI10 	 2010 Family Households with an American Indian/Alaska Native Householder (U.S. Census)
FAMHHASN10 	 2010 Family Households with an Asian Householder (U.S. Census)
FAMHHPI10 	 2010 Family Households with a Pacific Islander Householder (U.S. Census)
FAMHHOTH10 	 2010 Family Households with an Other Race Householder (U.S. Census)
FAMHHMLT10 	 2010 Family Households with a Multiple Races Householder (U.S. Census)
FAMHHWNH10 	 2010 Family Households with a White Non-Hispanic Householder (U.S. Census)
FAMHHHSP10 	 2010 Family Households with a Hispanic Householder (U.S. Census)
HWFAMWHT10 	 2010 Husband-wife Family Households with a White Householder (U.S. Census)
HWFAMBLK10 	 2010 Husband-wife Family Households with a Black/African American Householder (U.S. Census)
HWFAMAI10 	 2010 Husband-wife Family Households with an American Indian/Alaska Native Householder (U.S. Census)
HWFAMASN10 	 2010 Husband-wife Family Households with an Asian Householder (U.S. Census)
HWFAMPI10 	 2010 Husband-wife Family Households with a Pacific Islander Householder (U.S. Census)
HWFAMOTH10 	 2010 Husband-wife Family Households with an Other Race Householder (U.S. Census)
HWFAMMLT10 	 2010 Husband-wife Family Households with a Multiple Races Householder (U.S. Census)
HWFAMWNH10 	 2010 Husband-wife Family Households with a White Non-Hispanic Householder (U.S. Census)
HWFAMHSP10 	 2010 Husband-wife Family Households with a Hispanic Householder (U.S. Census)
OFAMWHT10 	 2010 Other Family Households with a White Householder (U.S. Census)
OFAMBLK10 	 2010 Other Family Households with a Black/African American Householder (U.S. Census)
OFAMAI10 	 2010 Other Family Households with an American Indian/Alaska Native Householder (U.S. Census)
OFAMASN10 	 2010 Other Family Households with an Asian Householder (U.S. Census)
OFAMPI10 	 2010 Other Family Households with a Pacific Islander Householder (U.S. Census)
OFAMOTH10 	 2010 Other Family Households with an Other Race Householder (U.S. Census)
OFAMMLT10 	 2010 Other Family Households with a Multiple Races Householder (U.S. Census)
OFAMWNH10 	 2010 Other Family Households with a White Non-Hispanic Householder (U.S. Census)
OFAMHSP10 	 2010 Other Family Households with a Hispanic Householder (U.S. Census)
NFAMWHT10 	 2010 Nonfamily Households with a White Householder (U.S. Census)
NFAMBLK10 	 2010 Nonfamily Households with a Black/African American Householder (U.S. Census)
NFAMAI10 	 2010 Nonfamily Households with an American Indian/Alaska Native Householder (U.S. Census)
NFAMASN10 	 2010 Nonfamily Households with an Asian Householder (U.S. Census)
NFAMPI10 	 2010 Nonfamily Households with a Pacific Islander Householder (U.S. Census)
NFAMOTH10 	 2010 Nonfamily Households with an Other Race Householder (U.S. Census)
NFAMMLT10 	 2010 Nonfamily Households with a Multiple Races Householder (U.S. Census)
NFAMWNH10 	 2010 Nonfamily Households with a White Non-Hispanic Householder (U.S. Census)
NFAMHSP10 	 2010 Nonfamily Households with a Hispanic Householder (U.S. Census)
HHRACBAS10 	 2010 Base for Households by Race of Householder (U.S. Census)
HWRACBAS10 	 2010 Base for Husband-wife Family Households by Race of Householder (U.S. Census)
FMRACBAS10 	 2010 Base for Family Households by Race of Householder (U.S. Census)
OFRACBAS10 	 2010 Base for Other Family Households by Race of Householder (U.S. Census)
NFRACBAS10 	 2010 Base for Nonfamily Households by Race of Householder (U.S. Census)
FAM2PERS10 	 2010 Family Households with 2 People (U.S. Census)
FAM3PERS10 	 2010 Family Households with 3 People (U.S. Census)
FAM4PERS10 	 2010 Family Households with 4 People (U.S. Census)
FAM5PERS10 	 2010 Family Households with 5 People (U.S. Census)
FAM6PERS10 	 2010 Family Households with 6 People (U.S. Census)
FAM7PERS10 	 2010 Family Households with 7+ People (U.S. Census)
NF1PERS10 	 2010 Nonfamily Households with 1 Person (U.S. Census)
NF2PERS10 	 2010 Nonfamily Households with 2 People (U.S. Census)
NF3PERS10 	 2010 Nonfamily Households with 3 People (U.S. Census)
NF4PERS10 	 2010 Nonfamily Households with 4 People (U.S. Census)
NF5PERS10 	 2010 Nonfamily Households with 5 People (U.S. Census)
NF6PERS10 	 2010 Nonfamily Households with 6 People (U.S. Census)
NF7PERS10 	 2010 Nonfamily Households with 7+ People (U.S. Census)
NFSZBASE10 	 2010 Base for Nonfamily Households by Size (U.S. Census)
FMHHR15C10 	 2010 Family Households with a Householder Age 15-24 (U.S. Census)
FMHHR25C10 	 2010 Family Households with a Householder Age 25-34 (U.S. Census)
FMHHR35C10 	 2010 Family Households with a Householder Age 35-44 (U.S. Census)
FMHHR45C10 	 2010 Family Households with a Householder Age 45-54 (U.S. Census)
FMHHR55C10 	 2010 Family Households with a Householder Age 55-64 (U.S. Census)
FMHHR65C10 	 2010 Family Households with a Householder Age 65-74 (U.S. Census)
FMHHR75C10 	 2010 Family Households with a Householder Age 75-84 (U.S. Census)
FMHHR85C10 	 2010 Family Households with a Householder Age 85+ (U.S. Census)
NFHHR15C10 	 2010 Nonfamily Households with a Householder Age 15-24 (U.S. Census)
NFHHR25C10 	 2010 Nonfamily Households with a Householder Age 25-34 (U.S. Census)
NFHHR35C10 	 2010 Nonfamily Households with a Householder Age 35-44 (U.S. Census)
NFHHR45C10 	 2010 Nonfamily Households with a Householder Age 45-54 (U.S. Census)
NFHHR55C10 	 2010 Nonfamily Households with a Householder Age 55-64 (U.S. Census)
NFHHR65C10 	 2010 Nonfamily Households with a Householder Age 65-74 (U.S. Census)
NFHHR75C10 	 2010 Nonfamily Households with a Householder Age 75-84 (U.S. Census)
NFHHR85C10 	 2010 Nonfamily Households with a Householder Age 85+ (U.S. Census)
FMAGEBAS10 	 2010 Base for Family Households by Age of Householder (U.S. Census)
NFAGEBAS10 	 2010 Base for Nonfamily Households by Age of Householder (U.S. Census)
HU18HWF10 	 2010 Husband-wife Family Households with Population Age <18 (U.S. Census)
HU18OFM10 	 2010 Other Family Households with a Male Householder and Population Age <18 (U.S. Census)
HU18OFF10 	 2010 Other Family Households with a Female Householder and Population Age <18 (U.S. Census)
HU18NFM10 	 2010 Nonfamily Households with a Male Householder and Population Age <18 (U.S. Census)
HU18NFF10 	 2010 Nonfamily Households with a Female Householder and Population Age <18 (U.S. Census)
HWFU18O10 	 2010 Husband-wife Families with Own Children Age <18 (U.S. Census)
HWFU6O10 	 2010 Husband-wife Families with Own Children Age <6 Only (U.S. Census)
HWF2AGEO10 	 2010 Husband-wife Families with Own Children Age <6 and 6-17 (U.S. Census)
HWF617O10 	 2010 Husband-wife Families with Own Children Age 6-17 Only (U.S. Census)
OFU18O10 	 2010 Other Family Households with Own Children Age <18 (U.S. Census)
OFU6O10 	 2010 Other Family Households with Own Children Age <6 Only (U.S. Census)
OF2AGEO10 	 2010 Other Family Households with Own Children Age <6 and 6-17 (U.S. Census)
OF617O10 	 2010 Other Family Households with Own Children Age 6-17 Only (U.S. Census)
OFMU18O10 	 2010 Other Family Households with a Male Householder and Own Children Age <18 (U.S. Census)
OFMU6O10 	 2010 Other Family Households with a Male Householder and Own Children Age <6 Only (U.S. Census)
OFM2AGEO10 	 2010 Other Family Households with a Male Householder and Own Children Age <6 and 6-17 (U.S. Census)
OFM617O10 	 2010 Other Family Households with a Male Householder and Own Children Age 6-17 Only (U.S. Census)
OFFU18O10 	 2010 Other Family Households with a Female Householder and Own Children Age <18 (U.S. Census)
OFFU6O10 	 2010 Other Family Households with a Female Householder and Own Children Age <6 Only (U.S. Census)
OFF2AGEO10 	 2010 Other Family Households with a Female Householder and Own Children Age <6 and 6-17 (U.S. Census)
OFF617O10 	 2010 Other Family Households with a Female Householder and Own Children Age 6-17 Only (U.S. Census)
FWHTU18O10 	 2010 Family Households with a White Householder and Own Children Age <18 (U.S. Census)
FBLKU18O10 	 2010 Family Households with a Black/African American Householder and Own Children Age <18 (U.S. Census)
FAIU18O10 	 2010 Family Households with an American Indian/Alaska Native Householder and Own Children Age <18 (U.S. Census)
FASNU18O10 	 2010 Family Households with an Asian Householder and Own Children Age <18 (U.S. Census)
FPIU18O10 	 2010 Family Households with a Pacific Islander Householder and Own Children Age <18 (U.S. Census)
FOTHU18O10 	 2010 Family Households with an Other Race Householder and Own Children Age <18 (U.S. Census)
FMLTU18O10 	 2010 Family Households with a Multiple Races Householder and Own Children Age <18 (U.S. Census)
FWNHU18O10 	 2010 Family Households with a White Non-Hispanic Householder and Own Children Age <18 (U.S. Census)
FHSPU18O10 	 2010 Family Households with a Hispanic Householder and Own Children Age <18 (U.S. Census)
HWFU18R10 	 2010 Husband-wife Families with Related Children Age <18 (U.S. Census)
HWFU6R10 	 2010 Husband-wife Families with Related Children Age <6 Only (U.S. Census)
HWF2AGER10 	 2010 Husband-wife Families with Related Children Age <6 and 6-17 (U.S. Census)
HWF617R10 	 2010 Husband-wife Families with Related Children Age 6-17 Only (U.S. Census)
OFU18R10 	 2010 Other Family Households with Related Children Age <18 (U.S. Census)
OFU6R10 	 2010 Other Family Households with Related Children Age <6 Only (U.S. Census)
OF2AGER10 	 2010 Other Family Households with Related Children Age <6 and 6-17 (U.S. Census)
OF617R10 	 2010 Other Family Households with Related Children Age 6-17 Only (U.S. Census)
OFMU18R10 	 2010 Other Family Households with a Male Householder and Related Children Age <18 (U.S. Census)
OFMU6R10 	 2010 Other Family Households with a Male Householder and Related Children Age <6 Only (U.S. Census)
OFM2AGER10 	 2010 Other Family Households with a Male Householder and Related Children Age <6 and 6-17 (U.S. Census)
OFM617R10 	 2010 Other Family Households with a Male Householder and Related Children Age 6-17 Only (U.S. Census)
OFFU18R10 	 2010 Other Family Households with a Female Householder and Related Children Age <18 (U.S. Census)
OFFU6R10 	 2010 Other Family Households with a Female Householder and Related Children Age <6 Only (U.S. Census)
OFF2AGER10 	 2010 Other Family Households with a Female Householder and Related Children Age <6 and 6-17 (U.S. Census)
OFF617R10 	 2010 Other Family Households with a Female Householder and Related Children Age 6-17 Only (U.S. Census)
FWHTU18R10 	 2010 Family Households with a White Householder and Related Children Age <18 (U.S. Census)
FBLKU18R10 	 2010 Family Households with a Black/African American Householder and Related Children Age <18 (U.S. Census)
FAIU18R10 	 2010 Family Households with an American Indian/Alaska Native Householder and Related Children Age <18 (U.S. Census)
FASNU18R10 	 2010 Family Households with an Asian Householder and Related Children Age <18 (U.S. Census)
FPIU18R10 	 2010 Family Households with a Pacific Islander Householder and Related Children Age <18 (U.S. Census)
FOTHU18R10 	 2010 Family Households with an Other Race Householder and Related Children Age <18 (U.S. Census)
FMLTU18R10 	 2010 Family Households with a Multiple Races Householder and Related Children Age <18 (U.S. Census)
FWNHU18R10 	 2010 Family Households with a White Non-Hispanic Householder and Related Children Age <18 (U.S. Census)
FHSPU18R10 	 2010 Family Households with a Hispanic Householder and Related Children Age <18 (U.S. Census)
HHNU18C10 	 2010 Households with No Population Age <18 (U.S. Census)
HNU18HWF10 	 2010 Husband-wife Family Households with No Population Age <18 (U.S. Census)
HNU18OFM10 	 2010 Other Family Households with a Male Householder and No Population Age <18 (U.S. Census)
HNU18OFF10 	 2010 Other Family Households with a Female Householder and No Population Age <18 (U.S. Census)
HNU18NFM10 	 2010 Nonfamily Households with a Male Householder and No Population Age <18 (U.S. Census)
HNU18NFF10 	 2010 Nonfamily Households with a Female Householder and No Population Age <18 (U.S. Census)
TOTHU10 	 2010 Total Housing Units (U.S. Census)
OWNER10 	 2010 Owner-occupied Housing Units (U.S. Census)
OOMORT10 	 2010 Owner-occupied Housing Units with a Mortgage/loan (U.S. Census)
OONOMORT10 	 2010 Owner-occupied Housing Units Owned Free and Clear (U.S. Census)
RENTER10 	 2010 Renter-occupied Housing Units (U.S. Census)
POPOWN10 	 2010 Population Living in Owner-occupied Housing Units (U.S. Census)
POPRENT10 	 2010 Population Living in Renter-occupied Housing Units (U.S. Census)
POPOWNM10 	 2010 Population Living in Occupied Housing units Owned with a Mortgage/Loan (U.S. Census)
POPOWNNM10 	 2010 Population Living in Occupied Housing Units Owned Free and Clear (U.S. Census)
URHUBASE10 	 2010 Urban/Rural Housing Unit Base (U.S. Census)
URBARHU10 	 2010 Housing Units Inside Urbanized Areas (U.S. Census)
URBCLHU10 	 2010 Housing Units Inside Urban Clusters (U.S. Census)
RURALHU10 	 2010 Rural Housing Units  (U.S. Census)
URBANHU10 	 2010 Urban Housing Units (U.S. Census)
OOWHTHHR10 	 2010 Owner-occupied Housing Units with a White Householder (U.S. Census)
OOBLKHHR10 	 2010 Owner-occupied Housing Units with a Black/African American Householder (U.S. Census)
OOAIHHR10 	 2010 Owner-occupied Housing Units with an American Indian/Alaska Native Householder (U.S. Census)
OOASNHHR10 	 2010 Owner-occupied Housing Units with an Asian Householder (U.S. Census)
OOPIHHR10 	 2010 Owner-occupied Housing Units with a Pacific Islander Householder (U.S. Census)
OOOTHHHR10 	 2010 Owner-occupied Housing Units with an Other Race Householder (U.S. Census)
OOMLTHHR10 	 2010 Owner-occupied Housing Units with a Multiple Races Householder (U.S. Census)
OOHSPHHR10 	 2010 Owner-occupied Housing Units with a Hispanic Householder (U.S. Census)
ROWHTHHR10 	 2010 Renter-occupied Housing Units with a White Householder (U.S. Census)
ROBLKHHR10 	 2010 Renter-occupied Housing Units with a Black/African American Householder (U.S. Census)
ROAIHHR10 	 2010 Renter-occupied Housing Units with an American Indian/Alaska Native Householder (U.S. Census)
ROASNHHR10 	 2010 Renter-occupied Housing Units with an Asian Householder (U.S. Census)
ROPIHHR10 	 2010 Renter-occupied Housing Units with a Pacific Islander Householder (U.S. Census)
ROOTHHHR10 	 2010 Renter-occupied Housing Units with an Other Race Householder (U.S. Census)
ROMLTHHR10 	 2010 Renter-occupied Housing Units with a Multiple Races Householder (U.S. Census)
ROHSPHHR10 	 2010 Renter-occupied Housing Units with a Hispanic Householder (U.S. Census)
OORACBAS10 	 2010 Base for Owner-occupied Housing Units by Race of Householder (U.S. Census)
RORACBAS10 	 2010 Base for Renter-occupied Housing Units by Race of Householder (U.S. Census)
OWN1PERS10 	 2010 Owner-occupied Housing Units with 1 Person (U.S. Census)
OWN2PERS10 	 2010 Owner-occupied Housing Units with 2 People (U.S. Census)
OWN3PERS10 	 2010 Owner-occupied Housing Units with 3 People (U.S. Census)
OWN4PERS10 	 2010 Owner-occupied Housing Units with 4 People (U.S. Census)
OWN5PERS10 	 2010 Owner-occupied Housing Units with 5 People (U.S. Census)
OWN6PERS10 	 2010 Owner-occupied Housing Units with 6 People (U.S. Census)
OWN7PERS10 	 2010 Owner-occupied Housing Units with 7+ People (U.S. Census)
OOSZBASE10 	 2010 Base for Owner-occupied Housing Units by Size (U.S. Census)
RNT1PERS10 	 2010 Renter-occupied Housing Units with 1 Person (U.S. Census)
RNT2PERS10 	 2010 Renter-occupied Housing Units with 2 People (U.S. Census)
RNT3PERS10 	 2010 Renter-occupied Housing Units with 3 People (U.S. Census)
RNT4PERS10 	 2010 Renter-occupied Housing Units with 4 People (U.S. Census)
RNT5PERS10 	 2010 Renter-occupied Housing Units with 5 People (U.S. Census)
RNT6PERS10 	 2010 Renter-occupied Housing Units with 6 People (U.S. Census)
RNT7PERS10 	 2010 Renter-occupied Housing Units with 7+ People (U.S. Census)
ROSZBASE10 	 2010 Base for Renter-occupied Housing Units by Size (U.S. Census)
OOHHR15C10 	 2010 Owner-occupied Housing Units with a Householder Age 15-24 (U.S. Census)
OOHHR25C10 	 2010 Owner-occupied Housing Units with a Householder Age 25-34 (U.S. Census)
OOHHR35C10 	 2010 Owner-occupied Housing Units with a Householder Age 35-44 (U.S. Census)
OOHHR45C10 	 2010 Owner-occupied Housing Units with a Householder Age 45-54 (U.S. Census)
OOHHR55C10 	 2010 Owner-occupied Housing Units with a Householder Age 55-64 (U.S. Census)
OOHHR65C10 	 2010 Owner-occupied Housing Units with a Householder Age 65-74 (U.S. Census)
OOHHR75C10 	 2010 Owner-occupied Housing Units with a Householder Age 75-84 (U.S. Census)
OOHHR85C10 	 2010 Owner-occupied Housing Units with a Householder Age 85+ (U.S. Census)
ROHHR15C10 	 2010 Renter-occupied Housing Units with a Householder Age 15-24 (U.S. Census)
ROHHR25C10 	 2010 Renter-occupied Housing Units with a Householder Age 25-34 (U.S. Census)
ROHHR35C10 	 2010 Renter-occupied Housing Units with a Householder Age 35-44 (U.S. Census)
ROHHR45C10 	 2010 Renter-occupied Housing Units with a Householder Age 45-54 (U.S. Census)
ROHHR55C10 	 2010 Renter-occupied Housing Units with a Householder Age 55-64 (U.S. Census)
ROHHR65C10 	 2010 Renter-occupied Housing Units with a Householder Age 65-74 (U.S. Census)
ROHHR75C10 	 2010 Renter-occupied Housing Units with a Householder Age 75-84 (U.S. Census)
ROHHR85C10 	 2010 Renter-occupied Housing Units with a Householder Age 85+ (U.S. Census)
VACANT10 	 2010 Vacant Housing Units (U.S. Census)
VACRENT10 	 2010 Vacant Housing Units: For Rent (U.S. Census)
VACRNTED10 	 2010 Vacant Housing Units: Rented - Not Occupied (U.S. Census)
VACSALE10 	 2010 Vacant Housing Units: For Sale Only (U.S. Census)
VACSOLD10 	 2010 Vacant Housing Units: Sold - Not Occupied (U.S. Census)
VACSEAS10 	 2010 Vacant Housing Units: Seasonal/Recreational/Occasional Use (U.S. Census)
VACMIGR10 	 2010 Vacant Housing Units: For Migrant Workers (U.S. Census)
VACOTHER10 	 2010 Vacant Housing Units: Other Vacant (U.S. Census)
VACBASE10 	 2010 Base for Vacant Housing Units by Vacancy Status (U.S. Census)
TOTPOP00 	 2000 Total Population (U.S. Census)
HHPOP00 	 2000 Population in Households (U.S. Census)
FAMPOP00 	 2000 Population in Families (U.S. Census)
TOTHH00 	 2000 Total Households (U.S. Census)
FAMHH00 	 2000 Total Family Households (U.S. Census)
TOTHU00 	 2000 Total Housing Units (U.S. Census)
OWNER00 	 2000 Owner Occupied Housing Units (U.S. Census)
RENTER00 	 2000 Renter Occupied Housing Units (U.S. Census)
TSEGNUM 	 2018 Dominant Tapestry Number (Esri)
TSEGCODE 	 2018 Dominant Tapestry Segment (Esri)
TSEGNAME 	 2018 Dominant Tapestry Segment Name (Esri)
THHBASE 	 2018 Base for Tapestry Segmentation Households (Esri)
THH01 	 2018 Top Tier (1A) Tapestry Households (Esri)
THH02 	 2018 Professional Pride (1B) Tapestry Households (Esri)
THH03 	 2018 Boomburbs (1C) Tapestry Households (Esri)
THH04 	 2018 Savvy Suburbanites (1D) Tapestry Households (Esri)
THH05 	 2018 Exurbanites (1E) Tapestry Households (Esri)
THH06 	 2018 Urban Chic (2A) Tapestry Households (Esri)
THH07 	 2018 Pleasantville (2B) Tapestry Households (Esri)
THH08 	 2018 Pacific Heights (2C) Tapestry Households (Esri)
THH09 	 2018 Enterprising Professionals (2D) Tapestry Households (Esri)
THH10 	 2018 Laptops and Lattes (3A) Tapestry Households (Esri)
THH11 	 2018 Metro Renters (3B) Tapestry Households (Esri)
THH12 	 2018 Trendsetters (3C) Tapestry Households (Esri)
THH13 	 2018 Soccer Moms (4A) Tapestry Households (Esri)
THH14 	 2018 Home Improvement (4B) Tapestry Households (Esri)
THH15 	 2018 Middleburg (4C) Tapestry Households (Esri)
THH16 	 2018 Comfortable Empty Nesters (5A) Tapestry Households (Esri)
THH17 	 2018 In Style (5B) Tapestry Households (Esri)
THH18 	 2018 Parks and Rec (5C) Tapestry Households (Esri)
THH19 	 2018 Rustbelt Traditions (5D) Tapestry Households (Esri)
THH20 	 2018 Midlife Constants (5E) Tapestry Households (Esri)
THH21 	 2018 Green Acres (6A) Tapestry Households (Esri)
THH22 	 2018 Salt of the Earth (6B) Tapestry Households (Esri)
THH23 	 2018 The Great Outdoors (6C) Tapestry Households (Esri)
THH24 	 2018 Prairie Living (6D) Tapestry Households (Esri)
THH25 	 2018 Rural Resort Dwellers (6E) Tapestry Households (Esri)
THH26 	 2018 Heartland Communities (6F) Tapestry Households (Esri)
THH27 	 2018 Up and Coming Families (7A) Tapestry Households (Esri)
THH28 	 2018 Urban Villages (7B) Tapestry Households (Esri)
THH29 	 2018 American Dreamers (7C) Tapestry Households (Esri)
THH30 	 2018 Barrios Urbanos (7D) Tapestry Households (Esri)
THH31 	 2018 Valley Growers (7E) Tapestry Households (Esri)
THH32 	 2018 Southwestern Families (7F) Tapestry Households (Esri)
THH33 	 2018 City Lights (8A) Tapestry Households (Esri)
THH34 	 2018 Emerald City (8B) Tapestry Households (Esri)
THH35 	 2018 Bright Young Professionals (8C) Tapestry Households (Esri)
THH36 	 2018 Downtown Melting Pot (8D) Tapestry Households (Esri)
THH37 	 2018 Front Porches (8E) Tapestry Households (Esri)
THH38 	 2018 Old and Newcomers (8F) Tapestry Households (Esri)
THH39 	 2018 Hardscrabble Road (8G) Tapestry Households (Esri)
THH40 	 2018 Silver & Gold (9A) Tapestry Households (Esri)
THH41 	 2018 Golden Years (9B) Tapestry Households (Esri)
THH42 	 2018 The Elders (9C) Tapestry Households (Esri)
THH43 	 2018 Senior Escapes (9D) Tapestry Households (Esri)
THH44 	 2018 Retirement Communities (9E) Tapestry Households (Esri)
THH45 	 2018 Social Security Set (9F) Tapestry Households (Esri)
THH46 	 2018 Southern Satellites (10A) Tapestry Households (Esri)
THH47 	 2018 Rooted Rural (10B) Tapestry Households (Esri)
THH48 	 2018 Diners & Miners (10C) Tapestry Households (Esri)
THH49 	 2018 Down the Road (10D) Tapestry Households (Esri)
THH50 	 2018 Rural Bypasses (10E) Tapestry Households (Esri)
THH51 	 2018 City Strivers (11A) Tapestry Households (Esri)
THH52 	 2018 Young and Restless (11B) Tapestry Households (Esri)
THH53 	 2018 Metro Fusion (11C) Tapestry Households (Esri)
THH54 	 2018 Set to Impress (11D) Tapestry Households (Esri)
THH55 	 2018 City Commons (11E) Tapestry Households (Esri)
THH56 	 2018 Family Foundations (12A) Tapestry Households (Esri)
THH57 	 2018 Traditional Living (12B) Tapestry Households (Esri)
THH58 	 2018 Small Town Simplicity (12C) Tapestry Households (Esri)
THH59 	 2018 Modest Income Homes (12D) Tapestry Households (Esri)
THH60 	 2018 International Marketplace (13A) Tapestry Households (Esri)
THH61 	 2018 Las Casas (13B) Tapestry Households (Esri)
THH62 	 2018 NeWest Residents (13C) Tapestry Households (Esri)
THH63 	 2018 Fresh Ambitions (13D) Tapestry Households (Esri)
THH64 	 2018 High Rise Renters (13E) Tapestry Households (Esri)
THH65 	 2018 Military Proximity (14A) Tapestry Households (Esri)
THH66 	 2018 College Towns (14B) Tapestry Households (Esri)
THH67 	 2018 Dorms to Diplomas (14C) Tapestry Households (Esri)
THH68 	 2018 Unclassified (15) Tapestry Households (Esri)
TLIFECODE 	 2018 Dominant Tapestry LifeMode Group Code
TLIFENAME 	 2018 Dominant Tapestry LifeMode Group Name
THHGRPL1 	 2018 Affluent Estates Tapestry LifeMode Group L1 Households (Esri)
THHGRPL2 	 2018 Upscale Avenues Tapestry LifeMode Group L2 Households (Esri)
THHGRPL3 	 2018 Uptown Individuals Tapestry LifeMode Group L3 Households (Esri)
THHGRPL4 	 2018 Family Landscapes Tapestry LifeMode Group L4 Households (Esri)
THHGRPL5 	 2018 GenXurban Tapestry LifeMode Group L5 Households (Esri)
THHGRPL6 	 2018 Cozy Country Living Tapestry LifeMode Group L6 Households (Esri)
THHGRPL7 	 2018 Ethnic Enclaves Tapestry LifeMode Group L7 Households (Esri)
THHGRPL8 	 2018 Middle Ground Tapestry LifeMode Group L8 Households (Esri)
THHGRPL9 	 2018 Senior Styles Tapestry LifeMode Group L9 Households (Esri)
THHGRPL10 	 2018 Rustic Outposts Tapestry LifeMode Group L10 Households (Esri)
THHGRPL11 	 2018 Midtown Singles Tapestry LifeMode Group L11 Households (Esri)
THHGRPL12 	 2018 Hometown Tapestry LifeMode Group L12 Households (Esri)
THHGRPL13 	 2018 Next Wave Tapestry LifeMode Group L13 Households (Esri)
THHGRPL14 	 2018 Scholars and Patriots Tapestry LifeMode Group L14 Households (Esri)
THHGRPU1 	 2018 Principal Urban Center Tapestry Urbanization Group U1 Households (Esri)
THHGRPU2 	 2018 Urban Periphery Tapestry Urbanization Group U2 Households (Esri)
THHGRPU3 	 2018 Metro Cities Tapestry Urbanization Group U3 Households (Esri)
THHGRPU4 	 2018 Suburban Periphery Tapestry Urbanization Group U4 Households (Esri)
THHGRPU5 	 2018 Semirural Tapestry Urbanization Group U5 Households (Esri)
THHGRPU6 	 2018 Rural Tapestry Urbanization Group U6 Households (Esri)
TADULTBASE 	 2018 Base for Tapestry Segmentation Adult Population (Esri)
TADULT01 	 2018 Top Tier (1A) Tapestry Adult Population (Esri)
TADULT02 	 2018 Professional Pride (1B) Tapestry Adult Population (Esri)
TADULT03 	 2018 Boomburbs (1C) Tapestry Adult Population (Esri)
TADULT04 	 2018 Savvy Suburbanites (1D) Tapestry Adult Population (Esri)
TADULT05 	 2018 Exurbanites (1E) Tapestry Adult Population (Esri)
TADULT06 	 2018 Urban Chic (2A) Tapestry Adult Population (Esri)
TADULT07 	 2018 Pleasantville (2B) Tapestry Adult Population (Esri)
TADULT08 	 2018 Pacific Heights (2C)Tapestry Adult Population (Esri)
TADULT09 	 2018 Enterprising Professionals (2D) Tapestry Adult Population (Esri)
TADULT10 	 2018 Laptops and Lattes (3A) Tapestry Adult Population (Esri)
TADULT11 	 2018 Metro Renters (3B) Tapestry Adult Population (Esri)
TADULT12 	 2018 Trendsetters (3C) Tapestry Adult Population (Esri)
TADULT13 	 2018 Soccer Moms (4A) Tapestry Adult Population (Esri)
TADULT14 	 2018 Home Improvement (4B) Tapestry Adult Population (Esri)
TADULT15 	 2018 Middleburg (4C) Tapestry Adult Population (Esri)
TADULT16 	 2018 Comfortable Empty Nesters (5A) Tapestry Adult Population (Esri)
TADULT17 	 2018 In Style (5B) Tapestry Adult Population (Esri)
TADULT18 	 2018 Parks and Rec (5C) Tapestry Adult Population (Esri)
TADULT19 	 2018 Rustbelt Traditions (5D) Tapestry Adult Population (Esri)
TADULT20 	 2018 Midlife Constants (5E) Tapestry Adult Population (Esri)
TADULT21 	 2018 Green Acres (6A) Tapestry Adult Population (Esri)
TADULT22 	 2018 Salt of the Earth (6B) Tapestry Adult Population (Esri)
TADULT23 	 2018 The Great Outdoors (6C) Tapestry Adult Population (Esri)
TADULT24 	 2018 Prairie Living (6D) Tapestry Adult Population (Esri)
TADULT25 	 2018 Rural Resort Dwellers (6E) Tapestry Adult Population (Esri)
TADULT26 	 2018 Heartland Communities (6F) Tapestry Adult Population (Esri)
TADULT27 	 2018 Up and Coming Families (7A) Tapestry Adult Population (Esri)
TADULT28 	 2018 Urban Villages (7B) Tapestry Adult Population (Esri)
TADULT29 	 2018 American Dreamers (7C) Tapestry Adult Population (Esri)
TADULT30 	 2018 Barrios Urbanos (7D) Tapestry Adult Population (Esri)
TADULT31 	 2018 Valley Growers (7E) Tapestry Adult Population (Esri)
TADULT32 	 2018 Southwestern Families (7F) Tapestry Adult Population (Esri)
TADULT33 	 2018 City Lights (8A) Tapestry Adult Population (Esri)
TADULT34 	 2018 Emerald City (8B) Tapestry Adult Population (Esri)
TADULT35 	 2018 Bright Young Professionals (8C) Tapestry Adult Population (Esri)
TADULT36 	 2018 Downtown Melting Pot (8D) Tapestry Adult Population (Esri)
TADULT37 	 2018 Front Porches (8E) Tapestry Adult Population (Esri)
TADULT38 	 2018 Old and Newcomers (8F) Tapestry Adult Population (Esri)
TADULT39 	 2018 Hardscrabble Road (8G) Tapestry Adult Population (Esri)
TADULT40 	 2018 Silver & Gold (9A) Tapestry Adult Population (Esri)
TADULT41 	 2018 Golden Years (9B) Tapestry Adult Population (Esri)
TADULT42 	 2018 The Elders (9C) Tapestry Adult Population (Esri)
TADULT43 	 2018 Senior Escapes (9D) Tapestry Adult Population (Esri)
TADULT44 	 2018 Retirement Communities (9E) Tapestry Adult Population (Esri)
TADULT45 	 2018 Social Security Set (9F) Tapestry Adult Population (Esri)
TADULT46 	 2018 Southern Satellites (10A) Tapestry Adult Population (Esri)
TADULT47 	 2018 Rooted Rural (10B) Tapestry Adult Population (Esri)
TADULT48 	 2018 Diners & Miners (10C) Tapestry Adult Population (Esri)
TADULT49 	 2018 Down the Road (10D) Tapestry Adult Population (Esri)
TADULT50 	 2018 Rural Bypasses (10E) Tapestry Adult Population (Esri)
TADULT51 	 2018 City Strivers (11A) Tapestry Adult Population (Esri)
TADULT52 	 2018 Young and Restless (11B) Tapestry Adult Population (Esri)
TADULT53 	 2018 Metro Fusion (11C) Tapestry Adult Population (Esri)
TADULT54 	 2018 Set to Impress (11D) Tapestry Adult Population (Esri)
TADULT55 	 2018 City Commons (11E) Tapestry Adult Population (Esri)
TADULT56 	 2018 Family Foundations (12A) Tapestry Adult Population (Esri)
TADULT57 	 2018 Traditional Living (12B) Tapestry Adult Population (Esri)
TADULT58 	 2018 Small Town Simplicity (12C) Tapestry Adult Population (Esri)
TADULT59 	 2018 Modest Income Homes (12D) Tapestry Adult Population (Esri)
TADULT60 	 2018 International Marketplace (13A) Tapestry Adult Population (Esri)
TADULT61 	 2018 Las Casas (13B) Tapestry Adult Population (Esri)
TADULT62 	 2018 NeWest Residents (13C) Tapestry Adult Population (Esri)
TADULT63 	 2018 Fresh Ambitions (13D) Tapestry Adult Population (Esri)
TADULT64 	 2018 High Rise Renters (13E) Tapestry Adult Population (Esri)
TADULT65 	 2018 Military Proximity (14A) Tapestry Adult Population (Esri)
TADULT66 	 2018 College Towns (14B) Tapestry Adult Population (Esri)
TADULT67 	 2018 Dorms to Diplomas (14C) Tapestry Adult Population (Esri)
TADULT68 	 2018 Unclassified (15) Tapestry Adult Population (Esri)
Shape_Length 	 Shape_Length
Shape_Area 	 Shape_Area
In [9]:
# Removing columns for 2023,2010,2000
state_df = state_df.loc[:,~state_df.columns.str.contains('FY|10|00')]
len(state_df.columns)
Out[9]:
894
In [10]:
# Removing columns for individual age
state_df = state_df.loc[:,~state_df.columns.str.startswith(('AGE','MAGE','FAGE'))]
len(state_df.columns)
Out[10]:
640
In [11]:
# Removing columns for Industry, Occupation
state_df = state_df.loc[:,~state_df.columns.str.startswith(('IND','OCC'))]
len(state_df.columns)
Out[11]:
596
In [12]:
# Removing Individual Income Columns
state_df = state_df.loc[:,~state_df.columns.str.contains('A15|A25|A35|A45|A55|A65|A75')]
len(state_df.columns)
Out[12]:
366
In [13]:
# Removing columns for Disposable Income and Net Worth
state_df = state_df.loc[:,~state_df.columns.str.startswith(('DI','NW'))]
len(state_df.columns)
Out[13]:
348
In [ ]:
# Removing columns for Tapestry Segmentation
state_df = state_df.loc[:,~state_df.columns.str.startswith(('TSE','THH','TADULT'))]
len(state_df.columns)
In [ ]:
# Removing columns for Home Value
state_df = state_df.loc[:,~state_df.columns.str.startswith(('VAL'))]
len(state_df.columns)
In [14]:
state_df.columns
Out[14]:
Index(['AAGEBASECY', 'AGGDI_CY', 'AGGHINC_CY', 'AGGINC_CY', 'AGGNW_CY',
       'AIFBASE_CY', 'AIMBASE_CY', 'AMERIND_CY', 'AREA', 'ASIAN_CY',
       ...
       'VAL250K_CY', 'VAL2M_CY', 'VAL50K_CY', 'VAL750K_CY', 'VALBASE_CY',
       'WAGEBASECY', 'WHITE_CY', 'WHTFBASECY', 'WHTMBASECY', 'WIDOWED_CY'],
      dtype='object', length=348)
In [21]:
print(obgyn_count_df.shape)
print(state_df.shape)
(56, 2)
(51, 348)

Merge dataframes

In [15]:
# Merge provider count and women_df at state level
newstate_obgyn_df = pd.merge(obgyn_count_df,state_df,left_on='RegionAbbr', right_on='ST_ABBREV',how='inner')
In [16]:
newstate_obgyn_df.shape
Out[16]:
(51, 350)

Correlation

In [17]:
test_newstate_df = newstate_obgyn_df.copy()
test_newstate_df.head()
Out[17]:
RegionAbbr Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GQPOP_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPAI_CY HISPASN_CY HISPBLK_CY HISPMLT_CY HISPOTH_CY HISPPI_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY ID LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NAME NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPOTH_CY NHSPPI_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OBJECTID OLDRGENSCY OTHFBASECY OTHMBASECY OTHRACE_CY OWNER_CY PACIFIC_CY PAGEBASECY PCI_CY PIFBASE_CY PIMBASE_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SHAPE SMCOLL_CY SOMEHS_CY STATE_NAME ST_ABBREV Shape_Area Shape_Length TADULT01 TADULT02 TADULT03 TADULT04 TADULT05 TADULT06 TADULT07 TADULT08 TADULT09 TADULT11 TADULT12 TADULT13 TADULT14 TADULT15 TADULT16 TADULT17 TADULT18 TADULT19 TADULT20 TADULT21 TADULT22 TADULT23 TADULT24 TADULT25 TADULT26 TADULT27 TADULT28 TADULT29 TADULT30 TADULT31 TADULT32 TADULT33 TADULT34 TADULT35 TADULT36 TADULT37 TADULT38 TADULT39 TADULT40 TADULT41 TADULT42 TADULT43 TADULT44 TADULT45 TADULT46 TADULT47 TADULT48 TADULT49 TADULT50 TADULT51 TADULT52 TADULT53 TADULT54 TADULT55 TADULT56 TADULT57 TADULT58 TADULT59 TADULT60 TADULT61 TADULT62 TADULT63 TADULT64 TADULT65 TADULT66 TADULT67 TADULT68 TADULTBASE THH01 THH02 THH03 THH04 THH05 THH06 THH07 THH08 THH09 THH11 THH12 THH13 THH14 THH15 THH16 THH17 THH18 THH19 THH20 THH21 THH22 THH23 THH24 THH25 THH26 THH27 THH28 THH29 THH30 THH31 THH32 THH33 THH34 THH35 THH36 THH37 THH38 THH39 THH40 THH41 THH42 THH43 THH44 THH45 THH46 THH47 THH48 THH49 THH50 THH51 THH52 THH53 THH54 THH55 THH56 THH57 THH58 THH59 THH60 THH61 THH62 THH63 THH64 THH65 THH66 THH67 THH68 THHBASE THHGRPL1 THHGRPL11 THHGRPL12 THHGRPL13 THHGRPL14 THHGRPL2 THHGRPL3 THHGRPL4 THHGRPL5 THHGRPL6 THHGRPL7 THHGRPL8 THHGRPL9 THHGRPU1 THHGRPU2 THHGRPU3 THHGRPU4 THHGRPU5 THHGRPU6 TLIFECODE TLIFENAME TOTHH_CY TOTHU_CY TOTPOP_CY TSEGCODE TSEGNAME TSEGNUM UNEMPRT_CY UNEMP_CY VACANT_CY VAL0_CY VAL150K_CY VAL1M_CY VAL1PT5MCY VAL250K_CY VAL2M_CY VAL50K_CY VAL750K_CY VALBASE_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
0 CA 7353 5808539 984770070408 1341852609490 1363545956974 10953288740347 186300 188412 374712 158042.920912 5808539 3057816 2750723 2056384 73844 3.50 2.92 100620 821339 637422 8055682 5552919 2345048 2345048 1186331 1158717 19595308 26629106 18678853 9166028 32063051 1246195 1267704 15535129 1399534 14709444 1533458 1442776 1332317 1220853 1252603 1262625 1290328 1247274 1173091 1008278 746364 527232 362402 447803 20024285 621048 1008060 39806791 8011720 9289070 813593 3342632 15757962 38993198 1280615 1084396 1102410 1036596 1486913 2149782 1630222 13335897 214901 94837 149373 953706 7017528 17243 15757962 7310374 4804568 7811593 7946369 374712 06 155779.2198 15076422 14203971 1298461 1348980 1481021 1618901 1503701 1378564 1227529 1251002 1245261 1228175 1301504 1076510 891235 637267 427533 272897 270401 19782506 32126345 15627854 36.2 56020 37.3 51.5 69051 35.1 99297 505800 10636136 25228888 1076167 1053726 California 11926897 159811 5713702 2195675 1176187 84542 141009 14577903 2557052 24048829 7102070 5 2806123 3484353 3617717 7102070 7294468 158252 158252 34254 79878 78374 2544656 2616684 30611551 2880555 28913415 3152359 2946477 2710881 2448382 2503605 2507886 2518503 2548778 2249601 1899513 1383631 954765 635299 718204 255.5 2129893 39806791 6041636 {'rings': [[[-13038833.5744, 3845968.519900001... 5627462 2067041 California CA 6.458207e+11 5.955195e+06 962752 447008 877339 707623 1030736 998289 1614673 1324877 854053 428180 1051926 640890 507501 147970 237918 290669 232487 111099 175840 175248 27484 508845 34216 94745 26920 657657 2654588 898660 530885 587455 321133 1177243 208733 337293 394628 476335 299210 59480 140493 366232 156521 289040 189701 202710 74475 54655 10628 210357 24920 79246 244837 409205 166215 21790 118065 25748 113377 9029 1432303 1875298 534518 504305 79548 103401 172871 214308 121327 30611551 435771 183824 367891 297569 476909 507339 673663 508597 428604 259020 577307 263847 213335 66627 109074 143993 108873 52243 85167 78061 12137 244469 15552 49244 13249 260783 911215 362738 195394 210403 128040 543776 111747 169541 165386 226491 161769 28909 76061 193740 98928 146079 107181 112822 31553 22139 5084 95731 9515 37825 135236 200618 89406 11253 50951 12199 59308 4548 605661 641139 209939 214632 38327 25756 76824 50008 179 13336104 1761964 474338 127006 1709698 152588 2118203 1161232 543809 499350 412712 2068573 1407619 734811 1827341 4374461 1267838 4807134 591397 467754 2 Upscale Avenues 13336104 14383561 39806791 7B Urban Villages 28 4.7 916455 1047457 190476 277000 678744 195039 432916 242837 160723 903689 7293065 21888277 21888277 10953440 10934837 1601462
1 TX 5115 1428081 663797428676 846781778790 860166554925 6544101733836 99642 101050 200692 264622.431161 1428081 736438 691643 1352089 65007 3.36 2.78 82927 640876 234140 5610338 3595450 3554094 3554094 1837649 1716445 13994294 18710254 13323060 7102474 23868426 1012163 958641 11007087 1023650 10392959 1088542 1028122 990111 912087 908014 888197 906409 1016393 815633 699159 508500 349890 230272 255883 14596063 796406 820030 28954616 5795902 7332348 603396 1902087 11500677 28351220 1099136 601595 972153 998707 1339610 1837748 1220161 10211181 108000 21467 126710 446880 3229534 4993 11500677 7563093 3900291 5712914 5787763 200692 48 261231.7115 10619025 9978508 1049926 1010959 1068334 1146033 1057803 1000356 900336 893942 864949 855845 1054854 749300 623922 440199 284583 169339 142828 14358553 22771838 11608584 34.8 48504 35.8 49.5 57286 33.8 89454 173734 7624216 16954978 459123 454026 Texas 7616564 92692 1406614 3427384 466269 37515 23827 11999638 1572787 17453939 3267049 44 1771782 1571022 1696027 3267049 6286745 28820 28820 29707 14439 14381 2062089 1969600 21626112 2091984 20371467 2234575 2085925 1990467 1812423 1801956 1753146 1762254 2071247 1564933 1323081 948699 634473 399611 398711 110.8 913149 28954616 3924542 {'rings': [[[-10822386.4159, 2999262.775600001... 4037002 1554142 Texas TX 9.460813e+11 9.621068e+06 257841 546026 1102103 504579 298473 141680 25966 3941 232406 435495 27305 751696 718565 539687 401342 297639 111651 342816 282798 522498 225754 193715 190129 160088 240532 1662778 199271 827432 1492651 7383 1369349 27222 182557 574840 1656 145357 286509 195161 82795 95111 17082 114932 97451 70012 854973 411283 295295 344420 112278 4120 700747 410891 133118 94734 161445 243184 227922 183344 38365 84691 621868 44070 24312 72359 201481 199469 60997 21626112 124524 236631 510390 229203 148579 78268 11804 1715 123382 270425 15874 334179 322524 256069 194257 156003 54214 166876 141026 242077 106842 94754 92548 81196 118859 746527 76855 359005 603599 3263 582375 10984 106059 311328 831 73537 158365 91562 43855 55012 10078 56954 56138 36794 392512 198958 135159 153282 47834 2198 438819 218771 73760 51764 73393 116283 113907 88717 18279 32041 289865 21319 12423 18523 95654 64280 157 10211287 1249327 785312 392300 373927 178457 215169 344348 912772 712376 736276 2371624 752666 258831 670984 2543938 1519018 3382976 702334 1391880 7 Ethnic Enclaves 10211287 11236543 28954616 7A Up and Coming Families 27 4.8 671234 1025256 561071 985102 66551 15750 527935 20493 1095680 94609 6285595 19562731 19562731 9877750 9684981 1165365
2 NY 5005 1774868 494056143933 721252426439 733561461654 5780147040071 57206 55978 113184 48359.759399 1774868 920657 854211 1234468 65662 3.27 2.59 95857 768205 451725 4524627 2844992 3202872 3202872 1720637 1482235 10297331 13980509 9750809 4711535 15422531 541010 622797 8316966 692667 7896904 736087 711718 665428 617325 653985 691792 725143 555213 671105 583941 447188 321376 227864 297383 10347030 556396 439969 20070143 4071725 4262278 575494 2207562 3920105 19494649 910026 562411 659740 628211 822195 1168671 908502 7524226 58228 16280 331729 299313 1562083 3773 3920105 1648699 3075758 1994498 1925607 113184 36 47126.3986 7603630 7176760 563187 645491 694720 735814 699391 649639 591431 624744 651555 664052 578913 595536 496269 361798 245015 158479 156451 9723113 16636184 7732110 39.0 51058 40.5 53.2 63751 37.6 87167 322649 5071787 9104863 369440 340441 New York 6469341 54956 1758588 2871143 410568 83316 6187 10965280 866788 16150038 1645399 33 1699757 825459 819940 1645399 3928983 9960 9960 36550 5029 4931 1104197 1268288 15920596 1387387 15073664 1471901 1411109 1315067 1208756 1278729 1343347 1389195 1134126 1266641 1080210 808986 566391 386343 453834 425.9 709881 20070143 3595416 {'rings': [[[-8259979.4246, 4949745.592100002]... 2182364 1012181 New York NY 2.323782e+11 5.026351e+06 512090 105026 4623 566085 222285 250800 1375859 372083 36331 199329 565803 94595 113012 39543 373383 232188 170661 324706 344500 271067 329966 269307 19946 113275 239738 665 189396 20342 1016 1005 2888 696353 107184 38266 1333128 73019 173289 194976 25993 345965 23485 24115 145463 144351 204688 104636 1156 28446 11960 1150953 23619 17471 149676 107735 83723 278978 126444 50178 647696 52872 63074 73315 1056586 17171 106449 111054 39680 15920596 227930 45156 1971 245731 101807 129891 578041 153655 19294 114087 297684 42464 49670 19702 178348 115820 85493 169528 177703 127239 155409 132719 9562 57642 120941 284 63030 8326 352 535 1156 332041 60446 20774 569263 37915 95602 102941 13893 191240 11264 12914 83122 86221 98353 50421 584 14648 1916 521013 13514 9730 84095 58870 42581 150061 70282 28208 261620 17305 24745 34054 494486 4732 41867 10397 263 7524399 622595 687222 291132 832210 56996 880881 853619 111836 726892 603512 73683 1218982 398654 2497180 1108306 940871 2104912 239022 633845 8 Middle Ground 7524399 8391638 20070143 2B Pleasantville 7 5.3 546522 867239 152062 379625 179685 56246 246121 99717 374729 263656 3926227 12613979 12613979 6448602 6165377 977829
3 FL 4133 585936 487005072197 613723856820 624450149363 6548612367402 40665 42463 83128 56491.338012 585936 316402 269534 1468305 59737 3.03 2.51 75281 803267 282862 5125816 2763015 3423250 3423250 1775199 1648051 9939670 14984858 9428446 5273287 15994410 540535 575794 8672285 647413 8288558 693040 652863 622949 602161 654907 696088 756439 556332 740359 711079 574407 426317 297361 348670 10667264 630616 434241 20875686 4066365 4142104 433652 1591194 5399203 20442034 951439 366646 868205 873200 1196903 1521148 970483 8152474 30738 13113 201778 241103 848135 3477 5399203 4060859 3663685 2732325 2666878 83128 12 53624.7587 8132434 7737236 561572 604324 667070 728403 671610 629910 591323 640640 666976 693978 574960 651105 617390 497457 358273 236773 224380 10208422 17479459 8404539 42.3 43866 43.9 55.4 52098 40.6 98640 212954 4819710 9694483 320999 306853 Florida 5579880 52390 572823 3221472 386749 50104 11742 11181203 770061 15476483 898239 10 2287450 433750 464489 898239 5193134 15219 15219 29913 7485 7734 1102107 1180118 16804719 1314483 16025794 1421443 1324473 1252859 1193484 1295547 1363064 1450417 1131292 1391464 1328469 1071864 784590 534134 573050 389.3 627852 20875686 2959407 {'rings': [[[-9124037.3451, 2817150.9723999985... 2990780 1107202 Florida FL 1.866243e+11 9.761724e+06 139564 203442 252298 342663 283344 129690 129485 3407 78849 131796 30196 479436 544452 543860 408053 288055 142999 417240 573770 261579 85398 333616 2029 115622 143470 540715 227391 933973 104898 70517 460679 56767 240719 452235 0 207742 413860 143688 644510 279740 779970 766863 377196 100898 428649 183680 8535 297341 166979 48101 323008 451913 233004 178840 285711 217009 234897 250408 90659 40210 127174 79439 13767 21497 103498 109161 20707 16804719 64080 84617 112750 150048 139641 68081 53419 1152 40455 79640 18059 206336 237762 248795 195362 149440 70108 204783 289645 118846 39620 162626 1011 60130 70532 238120 80416 393622 42245 27259 185836 27665 135609 234795 0 103443 231898 69296 347422 155361 465971 402057 222582 59214 190835 81384 3488 138256 62390 20779 187750 229070 131273 90284 117945 108972 124281 117164 41705 15882 54240 35494 7223 4930 49689 35423 57 8152541 551136 659156 468362 154544 90042 163107 111977 692893 909338 452765 967498 802706 1652607 229713 1692280 1574873 2924108 1011180 720330 9 Senior Styles 8152541 9790195 20875686 9C The Elders 42 5.1 511224 1637654 351168 819037 78889 20495 557404 36949 600047 111697 5192714 15242062 15242062 7772764 7469298 1199573
4 PA 3210 462360 315983343213 411902114464 418518490501 4125980999869 16036 16102 32138 45285.896438 462360 240313 222047 749637 61749 3.02 2.46 80493 806294 236846 3167219 1763503 1470953 1470953 765013 705940 6619516 9125523 6217293 3282447 9921694 335276 404682 5362136 433612 5076349 410643 397480 389122 375532 411895 447624 487329 355242 461925 408531 312098 231110 173218 235227 6642616 345422 268314 12992598 2573675 2724068 426311 1120165 987581 12566287 549498 299343 505620 485138 661013 933563 649666 5117219 13841 4066 72801 81708 393883 1223 987581 420059 2817515 484730 502851 32138 42 44742.7032 5010352 4726214 349790 417152 441081 428491 405440 392100 371081 405311 435283 463856 369830 429073 366389 265594 180573 120018 120580 6349982 10822050 5289824 41.4 46696 43.0 54.9 57362 39.8 126527 185452 2988934 3115252 161589 152711 Pennsylvania 3726095 18297 458294 1398152 232592 16338 3998 9877346 286064 12005017 410221 39 1270388 195431 214790 410221 3463374 5221 5221 32212 2622 2599 685066 821834 10372488 874693 9802563 839134 802920 781222 746613 817206 882907 951185 725072 890998 774920 577692 411683 293236 355807 290.4 314300 12992598 1653953 {'rings': [[[-8382772.6493, 4844948.8923999965... 1457813 585404 Pennsylvania PA 2.053022e+11 2.068588e+06 162479 224406 22707 432943 210046 93639 202612 1754 84748 134652 24943 212966 62172 134424 548302 271213 517207 239410 553292 575890 903871 107575 38382 88283 504795 7672 14931 45556 6099 2557 6112 108325 136072 71952 14130 273695 196055 165969 5495 221381 17439 19227 190704 111879 144975 257849 36862 11142 18502 63122 23301 34327 146156 125056 113432 220217 317061 254390 17469 0 2886 271578 15924 0 143081 121146 29470 10372488 74277 98686 10729 196059 101319 45957 93730 645 45424 82738 12942 99476 28229 66028 267265 135979 258794 127103 278212 269579 435594 52290 18313 44342 263868 3585 6189 20132 2629 902 2884 53850 73109 39839 6765 137745 110110 84780 2896 116222 10022 10151 101801 66453 70968 124551 18223 5868 6096 31133 14285 17713 80722 66212 56799 116780 175679 129971 7816 0 1255 123001 7629 0 57457 25114 82 5117327 481070 210065 479229 139701 82571 185756 118011 193733 1067353 1083986 36321 506198 307545 287794 465570 1070547 1730882 522496 1039956 6 Cozy Country Living 5117327 5703807 12992598 6B Salt of the Earth 22 6.1 402223 586480 222750 599167 27840 4755 326829 6624 516090 45734 3463173 10297405 10297405 5261612 5035793 725053
In [18]:
test_newstate_df.drop(['RegionAbbr','OBJECTID','SHAPE','STATE_NAME','ST_ABBREV','NAME','Shape_Area','Shape_Length','TLIFENAME','TSEGCODE','TSEGNAME','ID','TLIFECODE'], axis=1, inplace=True)
test_newstate_df.head()
Out[18]:
Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GQPOP_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPAI_CY HISPASN_CY HISPBLK_CY HISPMLT_CY HISPOTH_CY HISPPI_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPOTH_CY NHSPPI_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OLDRGENSCY OTHFBASECY OTHMBASECY OTHRACE_CY OWNER_CY PACIFIC_CY PAGEBASECY PCI_CY PIFBASE_CY PIMBASE_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SMCOLL_CY SOMEHS_CY TADULT01 TADULT02 TADULT03 TADULT04 TADULT05 TADULT06 TADULT07 TADULT08 TADULT09 TADULT11 TADULT12 TADULT13 TADULT14 TADULT15 TADULT16 TADULT17 TADULT18 TADULT19 TADULT20 TADULT21 TADULT22 TADULT23 TADULT24 TADULT25 TADULT26 TADULT27 TADULT28 TADULT29 TADULT30 TADULT31 TADULT32 TADULT33 TADULT34 TADULT35 TADULT36 TADULT37 TADULT38 TADULT39 TADULT40 TADULT41 TADULT42 TADULT43 TADULT44 TADULT45 TADULT46 TADULT47 TADULT48 TADULT49 TADULT50 TADULT51 TADULT52 TADULT53 TADULT54 TADULT55 TADULT56 TADULT57 TADULT58 TADULT59 TADULT60 TADULT61 TADULT62 TADULT63 TADULT64 TADULT65 TADULT66 TADULT67 TADULT68 TADULTBASE THH01 THH02 THH03 THH04 THH05 THH06 THH07 THH08 THH09 THH11 THH12 THH13 THH14 THH15 THH16 THH17 THH18 THH19 THH20 THH21 THH22 THH23 THH24 THH25 THH26 THH27 THH28 THH29 THH30 THH31 THH32 THH33 THH34 THH35 THH36 THH37 THH38 THH39 THH40 THH41 THH42 THH43 THH44 THH45 THH46 THH47 THH48 THH49 THH50 THH51 THH52 THH53 THH54 THH55 THH56 THH57 THH58 THH59 THH60 THH61 THH62 THH63 THH64 THH65 THH66 THH67 THH68 THHBASE THHGRPL1 THHGRPL11 THHGRPL12 THHGRPL13 THHGRPL14 THHGRPL2 THHGRPL3 THHGRPL4 THHGRPL5 THHGRPL6 THHGRPL7 THHGRPL8 THHGRPL9 THHGRPU1 THHGRPU2 THHGRPU3 THHGRPU4 THHGRPU5 THHGRPU6 TOTHH_CY TOTHU_CY TOTPOP_CY TSEGNUM UNEMPRT_CY UNEMP_CY VACANT_CY VAL0_CY VAL150K_CY VAL1M_CY VAL1PT5MCY VAL250K_CY VAL2M_CY VAL50K_CY VAL750K_CY VALBASE_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
0 7353 5808539 984770070408 1341852609490 1363545956974 10953288740347 186300 188412 374712 158042.920912 5808539 3057816 2750723 2056384 73844 3.50 2.92 100620 821339 637422 8055682 5552919 2345048 2345048 1186331 1158717 19595308 26629106 18678853 9166028 32063051 1246195 1267704 15535129 1399534 14709444 1533458 1442776 1332317 1220853 1252603 1262625 1290328 1247274 1173091 1008278 746364 527232 362402 447803 20024285 621048 1008060 39806791 8011720 9289070 813593 3342632 15757962 38993198 1280615 1084396 1102410 1036596 1486913 2149782 1630222 13335897 214901 94837 149373 953706 7017528 17243 15757962 7310374 4804568 7811593 7946369 374712 155779.2198 15076422 14203971 1298461 1348980 1481021 1618901 1503701 1378564 1227529 1251002 1245261 1228175 1301504 1076510 891235 637267 427533 272897 270401 19782506 32126345 15627854 36.2 56020 37.3 51.5 69051 35.1 99297 505800 10636136 25228888 1076167 1053726 11926897 159811 5713702 2195675 1176187 84542 141009 14577903 2557052 24048829 7102070 2806123 3484353 3617717 7102070 7294468 158252 158252 34254 79878 78374 2544656 2616684 30611551 2880555 28913415 3152359 2946477 2710881 2448382 2503605 2507886 2518503 2548778 2249601 1899513 1383631 954765 635299 718204 255.5 2129893 39806791 6041636 5627462 2067041 962752 447008 877339 707623 1030736 998289 1614673 1324877 854053 428180 1051926 640890 507501 147970 237918 290669 232487 111099 175840 175248 27484 508845 34216 94745 26920 657657 2654588 898660 530885 587455 321133 1177243 208733 337293 394628 476335 299210 59480 140493 366232 156521 289040 189701 202710 74475 54655 10628 210357 24920 79246 244837 409205 166215 21790 118065 25748 113377 9029 1432303 1875298 534518 504305 79548 103401 172871 214308 121327 30611551 435771 183824 367891 297569 476909 507339 673663 508597 428604 259020 577307 263847 213335 66627 109074 143993 108873 52243 85167 78061 12137 244469 15552 49244 13249 260783 911215 362738 195394 210403 128040 543776 111747 169541 165386 226491 161769 28909 76061 193740 98928 146079 107181 112822 31553 22139 5084 95731 9515 37825 135236 200618 89406 11253 50951 12199 59308 4548 605661 641139 209939 214632 38327 25756 76824 50008 179 13336104 1761964 474338 127006 1709698 152588 2118203 1161232 543809 499350 412712 2068573 1407619 734811 1827341 4374461 1267838 4807134 591397 467754 13336104 14383561 39806791 28 4.7 916455 1047457 190476 277000 678744 195039 432916 242837 160723 903689 7293065 21888277 21888277 10953440 10934837 1601462
1 5115 1428081 663797428676 846781778790 860166554925 6544101733836 99642 101050 200692 264622.431161 1428081 736438 691643 1352089 65007 3.36 2.78 82927 640876 234140 5610338 3595450 3554094 3554094 1837649 1716445 13994294 18710254 13323060 7102474 23868426 1012163 958641 11007087 1023650 10392959 1088542 1028122 990111 912087 908014 888197 906409 1016393 815633 699159 508500 349890 230272 255883 14596063 796406 820030 28954616 5795902 7332348 603396 1902087 11500677 28351220 1099136 601595 972153 998707 1339610 1837748 1220161 10211181 108000 21467 126710 446880 3229534 4993 11500677 7563093 3900291 5712914 5787763 200692 261231.7115 10619025 9978508 1049926 1010959 1068334 1146033 1057803 1000356 900336 893942 864949 855845 1054854 749300 623922 440199 284583 169339 142828 14358553 22771838 11608584 34.8 48504 35.8 49.5 57286 33.8 89454 173734 7624216 16954978 459123 454026 7616564 92692 1406614 3427384 466269 37515 23827 11999638 1572787 17453939 3267049 1771782 1571022 1696027 3267049 6286745 28820 28820 29707 14439 14381 2062089 1969600 21626112 2091984 20371467 2234575 2085925 1990467 1812423 1801956 1753146 1762254 2071247 1564933 1323081 948699 634473 399611 398711 110.8 913149 28954616 3924542 4037002 1554142 257841 546026 1102103 504579 298473 141680 25966 3941 232406 435495 27305 751696 718565 539687 401342 297639 111651 342816 282798 522498 225754 193715 190129 160088 240532 1662778 199271 827432 1492651 7383 1369349 27222 182557 574840 1656 145357 286509 195161 82795 95111 17082 114932 97451 70012 854973 411283 295295 344420 112278 4120 700747 410891 133118 94734 161445 243184 227922 183344 38365 84691 621868 44070 24312 72359 201481 199469 60997 21626112 124524 236631 510390 229203 148579 78268 11804 1715 123382 270425 15874 334179 322524 256069 194257 156003 54214 166876 141026 242077 106842 94754 92548 81196 118859 746527 76855 359005 603599 3263 582375 10984 106059 311328 831 73537 158365 91562 43855 55012 10078 56954 56138 36794 392512 198958 135159 153282 47834 2198 438819 218771 73760 51764 73393 116283 113907 88717 18279 32041 289865 21319 12423 18523 95654 64280 157 10211287 1249327 785312 392300 373927 178457 215169 344348 912772 712376 736276 2371624 752666 258831 670984 2543938 1519018 3382976 702334 1391880 10211287 11236543 28954616 27 4.8 671234 1025256 561071 985102 66551 15750 527935 20493 1095680 94609 6285595 19562731 19562731 9877750 9684981 1165365
2 5005 1774868 494056143933 721252426439 733561461654 5780147040071 57206 55978 113184 48359.759399 1774868 920657 854211 1234468 65662 3.27 2.59 95857 768205 451725 4524627 2844992 3202872 3202872 1720637 1482235 10297331 13980509 9750809 4711535 15422531 541010 622797 8316966 692667 7896904 736087 711718 665428 617325 653985 691792 725143 555213 671105 583941 447188 321376 227864 297383 10347030 556396 439969 20070143 4071725 4262278 575494 2207562 3920105 19494649 910026 562411 659740 628211 822195 1168671 908502 7524226 58228 16280 331729 299313 1562083 3773 3920105 1648699 3075758 1994498 1925607 113184 47126.3986 7603630 7176760 563187 645491 694720 735814 699391 649639 591431 624744 651555 664052 578913 595536 496269 361798 245015 158479 156451 9723113 16636184 7732110 39.0 51058 40.5 53.2 63751 37.6 87167 322649 5071787 9104863 369440 340441 6469341 54956 1758588 2871143 410568 83316 6187 10965280 866788 16150038 1645399 1699757 825459 819940 1645399 3928983 9960 9960 36550 5029 4931 1104197 1268288 15920596 1387387 15073664 1471901 1411109 1315067 1208756 1278729 1343347 1389195 1134126 1266641 1080210 808986 566391 386343 453834 425.9 709881 20070143 3595416 2182364 1012181 512090 105026 4623 566085 222285 250800 1375859 372083 36331 199329 565803 94595 113012 39543 373383 232188 170661 324706 344500 271067 329966 269307 19946 113275 239738 665 189396 20342 1016 1005 2888 696353 107184 38266 1333128 73019 173289 194976 25993 345965 23485 24115 145463 144351 204688 104636 1156 28446 11960 1150953 23619 17471 149676 107735 83723 278978 126444 50178 647696 52872 63074 73315 1056586 17171 106449 111054 39680 15920596 227930 45156 1971 245731 101807 129891 578041 153655 19294 114087 297684 42464 49670 19702 178348 115820 85493 169528 177703 127239 155409 132719 9562 57642 120941 284 63030 8326 352 535 1156 332041 60446 20774 569263 37915 95602 102941 13893 191240 11264 12914 83122 86221 98353 50421 584 14648 1916 521013 13514 9730 84095 58870 42581 150061 70282 28208 261620 17305 24745 34054 494486 4732 41867 10397 263 7524399 622595 687222 291132 832210 56996 880881 853619 111836 726892 603512 73683 1218982 398654 2497180 1108306 940871 2104912 239022 633845 7524399 8391638 20070143 7 5.3 546522 867239 152062 379625 179685 56246 246121 99717 374729 263656 3926227 12613979 12613979 6448602 6165377 977829
3 4133 585936 487005072197 613723856820 624450149363 6548612367402 40665 42463 83128 56491.338012 585936 316402 269534 1468305 59737 3.03 2.51 75281 803267 282862 5125816 2763015 3423250 3423250 1775199 1648051 9939670 14984858 9428446 5273287 15994410 540535 575794 8672285 647413 8288558 693040 652863 622949 602161 654907 696088 756439 556332 740359 711079 574407 426317 297361 348670 10667264 630616 434241 20875686 4066365 4142104 433652 1591194 5399203 20442034 951439 366646 868205 873200 1196903 1521148 970483 8152474 30738 13113 201778 241103 848135 3477 5399203 4060859 3663685 2732325 2666878 83128 53624.7587 8132434 7737236 561572 604324 667070 728403 671610 629910 591323 640640 666976 693978 574960 651105 617390 497457 358273 236773 224380 10208422 17479459 8404539 42.3 43866 43.9 55.4 52098 40.6 98640 212954 4819710 9694483 320999 306853 5579880 52390 572823 3221472 386749 50104 11742 11181203 770061 15476483 898239 2287450 433750 464489 898239 5193134 15219 15219 29913 7485 7734 1102107 1180118 16804719 1314483 16025794 1421443 1324473 1252859 1193484 1295547 1363064 1450417 1131292 1391464 1328469 1071864 784590 534134 573050 389.3 627852 20875686 2959407 2990780 1107202 139564 203442 252298 342663 283344 129690 129485 3407 78849 131796 30196 479436 544452 543860 408053 288055 142999 417240 573770 261579 85398 333616 2029 115622 143470 540715 227391 933973 104898 70517 460679 56767 240719 452235 0 207742 413860 143688 644510 279740 779970 766863 377196 100898 428649 183680 8535 297341 166979 48101 323008 451913 233004 178840 285711 217009 234897 250408 90659 40210 127174 79439 13767 21497 103498 109161 20707 16804719 64080 84617 112750 150048 139641 68081 53419 1152 40455 79640 18059 206336 237762 248795 195362 149440 70108 204783 289645 118846 39620 162626 1011 60130 70532 238120 80416 393622 42245 27259 185836 27665 135609 234795 0 103443 231898 69296 347422 155361 465971 402057 222582 59214 190835 81384 3488 138256 62390 20779 187750 229070 131273 90284 117945 108972 124281 117164 41705 15882 54240 35494 7223 4930 49689 35423 57 8152541 551136 659156 468362 154544 90042 163107 111977 692893 909338 452765 967498 802706 1652607 229713 1692280 1574873 2924108 1011180 720330 8152541 9790195 20875686 42 5.1 511224 1637654 351168 819037 78889 20495 557404 36949 600047 111697 5192714 15242062 15242062 7772764 7469298 1199573
4 3210 462360 315983343213 411902114464 418518490501 4125980999869 16036 16102 32138 45285.896438 462360 240313 222047 749637 61749 3.02 2.46 80493 806294 236846 3167219 1763503 1470953 1470953 765013 705940 6619516 9125523 6217293 3282447 9921694 335276 404682 5362136 433612 5076349 410643 397480 389122 375532 411895 447624 487329 355242 461925 408531 312098 231110 173218 235227 6642616 345422 268314 12992598 2573675 2724068 426311 1120165 987581 12566287 549498 299343 505620 485138 661013 933563 649666 5117219 13841 4066 72801 81708 393883 1223 987581 420059 2817515 484730 502851 32138 44742.7032 5010352 4726214 349790 417152 441081 428491 405440 392100 371081 405311 435283 463856 369830 429073 366389 265594 180573 120018 120580 6349982 10822050 5289824 41.4 46696 43.0 54.9 57362 39.8 126527 185452 2988934 3115252 161589 152711 3726095 18297 458294 1398152 232592 16338 3998 9877346 286064 12005017 410221 1270388 195431 214790 410221 3463374 5221 5221 32212 2622 2599 685066 821834 10372488 874693 9802563 839134 802920 781222 746613 817206 882907 951185 725072 890998 774920 577692 411683 293236 355807 290.4 314300 12992598 1653953 1457813 585404 162479 224406 22707 432943 210046 93639 202612 1754 84748 134652 24943 212966 62172 134424 548302 271213 517207 239410 553292 575890 903871 107575 38382 88283 504795 7672 14931 45556 6099 2557 6112 108325 136072 71952 14130 273695 196055 165969 5495 221381 17439 19227 190704 111879 144975 257849 36862 11142 18502 63122 23301 34327 146156 125056 113432 220217 317061 254390 17469 0 2886 271578 15924 0 143081 121146 29470 10372488 74277 98686 10729 196059 101319 45957 93730 645 45424 82738 12942 99476 28229 66028 267265 135979 258794 127103 278212 269579 435594 52290 18313 44342 263868 3585 6189 20132 2629 902 2884 53850 73109 39839 6765 137745 110110 84780 2896 116222 10022 10151 101801 66453 70968 124551 18223 5868 6096 31133 14285 17713 80722 66212 56799 116780 175679 129971 7816 0 1255 123001 7629 0 57457 25114 82 5117327 481070 210065 479229 139701 82571 185756 118011 193733 1067353 1083986 36321 506198 307545 287794 465570 1070547 1730882 522496 1039956 5117327 5703807 12992598 22 6.1 402223 586480 222750 599167 27840 4755 326829 6624 516090 45734 3463173 10297405 10297405 5261612 5035793 725053
In [19]:
# Check Datatypes of different columns
g = test_newstate_df.columns.to_series().groupby(test_newstate_df.dtypes).groups
g
Out[19]:
{dtype('int64'): Index(['AAGEBASECY', 'AGGDI_CY', 'AGGHINC_CY', 'AGGINC_CY', 'AGGNW_CY',
        'AIFBASE_CY', 'AIMBASE_CY', 'AMERIND_CY', 'ASIAN_CY', 'ASNFBASECY',
        ...
        'VAL250K_CY', 'VAL2M_CY', 'VAL50K_CY', 'VAL750K_CY', 'VALBASE_CY',
        'WAGEBASECY', 'WHITE_CY', 'WHTFBASECY', 'WHTMBASECY', 'WIDOWED_CY'],
       dtype='object', length=326),
 dtype('float64'): Index(['AREA', 'AVGFMSZ_CY', 'AVGHHSZ_CY', 'LANDAREA', 'MEDAGE_CY',
        'MEDFAGE_CY', 'MEDHHR_CY', 'MEDMAGE_CY', 'POPDENS_CY', 'UNEMPRT_CY'],
       dtype='object'),
 dtype('O'): Index(['Provider_Count'], dtype='object')}
In [20]:
# Change Provider Count to Float
test_newstate_df['Provider_Count'] = test_newstate_df['Provider_Count'].astype(float)
In [114]:
test_newstate_df.dtypes
Out[114]:
Provider_Count    float64
AAGEBASECY          int64
AGGDI_CY            int64
AGGHINC_CY          int64
AGGINC_CY           int64
AGGNW_CY            int64
AIFBASE_CY          int64
AIMBASE_CY          int64
AMERIND_CY          int64
AREA              float64
ASIAN_CY            int64
ASNFBASECY          int64
ASNMBASECY          int64
ASSCDEG_CY          int64
AVGDI_CY            int64
AVGFMSZ_CY        float64
AVGHHSZ_CY        float64
AVGHINC_CY          int64
AVGNW_CY            int64
AVGVAL_CY           int64
BABYBOOMCY          int64
BACHDEG_CY          int64
BAGEBASECY          int64
BLACK_CY            int64
BLKFBASECY          int64
BLKMBASECY          int64
CIVLBFR_CY          int64
EDUCBASECY          int64
EMP_CY              int64
FAMHH_CY            int64
                   ...   
THHGRPL7            int64
THHGRPL8            int64
THHGRPL9            int64
THHGRPU1            int64
THHGRPU2            int64
THHGRPU3            int64
THHGRPU4            int64
THHGRPU5            int64
THHGRPU6            int64
TOTHH_CY            int64
TOTHU_CY            int64
TOTPOP_CY           int64
TSEGNUM             int64
UNEMPRT_CY        float64
UNEMP_CY            int64
VACANT_CY           int64
VAL0_CY             int64
VAL150K_CY          int64
VAL1M_CY            int64
VAL1PT5MCY          int64
VAL250K_CY          int64
VAL2M_CY            int64
VAL50K_CY           int64
VAL750K_CY          int64
VALBASE_CY          int64
WAGEBASECY          int64
WHITE_CY            int64
WHTFBASECY          int64
WHTMBASECY          int64
WIDOWED_CY          int64
Length: 337, dtype: object
In [115]:
test_newstate_df.head()
Out[115]:
Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GQPOP_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPAI_CY HISPASN_CY HISPBLK_CY HISPMLT_CY HISPOTH_CY HISPPI_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPOTH_CY NHSPPI_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OLDRGENSCY OTHFBASECY OTHMBASECY OTHRACE_CY OWNER_CY PACIFIC_CY PAGEBASECY PCI_CY PIFBASE_CY PIMBASE_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SMCOLL_CY SOMEHS_CY TADULT01 TADULT02 TADULT03 TADULT04 TADULT05 TADULT06 TADULT07 TADULT08 TADULT09 TADULT11 TADULT12 TADULT13 TADULT14 TADULT15 TADULT16 TADULT17 TADULT18 TADULT19 TADULT20 TADULT21 TADULT22 TADULT23 TADULT24 TADULT25 TADULT26 TADULT27 TADULT28 TADULT29 TADULT30 TADULT31 TADULT32 TADULT33 TADULT34 TADULT35 TADULT36 TADULT37 TADULT38 TADULT39 TADULT40 TADULT41 TADULT42 TADULT43 TADULT44 TADULT45 TADULT46 TADULT47 TADULT48 TADULT49 TADULT50 TADULT51 TADULT52 TADULT53 TADULT54 TADULT55 TADULT56 TADULT57 TADULT58 TADULT59 TADULT60 TADULT61 TADULT62 TADULT63 TADULT64 TADULT65 TADULT66 TADULT67 TADULT68 TADULTBASE THH01 THH02 THH03 THH04 THH05 THH06 THH07 THH08 THH09 THH11 THH12 THH13 THH14 THH15 THH16 THH17 THH18 THH19 THH20 THH21 THH22 THH23 THH24 THH25 THH26 THH27 THH28 THH29 THH30 THH31 THH32 THH33 THH34 THH35 THH36 THH37 THH38 THH39 THH40 THH41 THH42 THH43 THH44 THH45 THH46 THH47 THH48 THH49 THH50 THH51 THH52 THH53 THH54 THH55 THH56 THH57 THH58 THH59 THH60 THH61 THH62 THH63 THH64 THH65 THH66 THH67 THH68 THHBASE THHGRPL1 THHGRPL11 THHGRPL12 THHGRPL13 THHGRPL14 THHGRPL2 THHGRPL3 THHGRPL4 THHGRPL5 THHGRPL6 THHGRPL7 THHGRPL8 THHGRPL9 THHGRPU1 THHGRPU2 THHGRPU3 THHGRPU4 THHGRPU5 THHGRPU6 TOTHH_CY TOTHU_CY TOTPOP_CY TSEGNUM UNEMPRT_CY UNEMP_CY VACANT_CY VAL0_CY VAL150K_CY VAL1M_CY VAL1PT5MCY VAL250K_CY VAL2M_CY VAL50K_CY VAL750K_CY VALBASE_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
0 7353.0 5808539 984770070408 1341852609490 1363545956974 10953288740347 186300 188412 374712 158042.920912 5808539 3057816 2750723 2056384 73844 3.50 2.92 100620 821339 637422 8055682 5552919 2345048 2345048 1186331 1158717 19595308 26629106 18678853 9166028 32063051 1246195 1267704 15535129 1399534 14709444 1533458 1442776 1332317 1220853 1252603 1262625 1290328 1247274 1173091 1008278 746364 527232 362402 447803 20024285 621048 1008060 39806791 8011720 9289070 813593 3342632 15757962 38993198 1280615 1084396 1102410 1036596 1486913 2149782 1630222 13335897 214901 94837 149373 953706 7017528 17243 15757962 7310374 4804568 7811593 7946369 374712 155779.2198 15076422 14203971 1298461 1348980 1481021 1618901 1503701 1378564 1227529 1251002 1245261 1228175 1301504 1076510 891235 637267 427533 272897 270401 19782506 32126345 15627854 36.2 56020 37.3 51.5 69051 35.1 99297 505800 10636136 25228888 1076167 1053726 11926897 159811 5713702 2195675 1176187 84542 141009 14577903 2557052 24048829 7102070 2806123 3484353 3617717 7102070 7294468 158252 158252 34254 79878 78374 2544656 2616684 30611551 2880555 28913415 3152359 2946477 2710881 2448382 2503605 2507886 2518503 2548778 2249601 1899513 1383631 954765 635299 718204 255.5 2129893 39806791 6041636 5627462 2067041 962752 447008 877339 707623 1030736 998289 1614673 1324877 854053 428180 1051926 640890 507501 147970 237918 290669 232487 111099 175840 175248 27484 508845 34216 94745 26920 657657 2654588 898660 530885 587455 321133 1177243 208733 337293 394628 476335 299210 59480 140493 366232 156521 289040 189701 202710 74475 54655 10628 210357 24920 79246 244837 409205 166215 21790 118065 25748 113377 9029 1432303 1875298 534518 504305 79548 103401 172871 214308 121327 30611551 435771 183824 367891 297569 476909 507339 673663 508597 428604 259020 577307 263847 213335 66627 109074 143993 108873 52243 85167 78061 12137 244469 15552 49244 13249 260783 911215 362738 195394 210403 128040 543776 111747 169541 165386 226491 161769 28909 76061 193740 98928 146079 107181 112822 31553 22139 5084 95731 9515 37825 135236 200618 89406 11253 50951 12199 59308 4548 605661 641139 209939 214632 38327 25756 76824 50008 179 13336104 1761964 474338 127006 1709698 152588 2118203 1161232 543809 499350 412712 2068573 1407619 734811 1827341 4374461 1267838 4807134 591397 467754 13336104 14383561 39806791 28 4.7 916455 1047457 190476 277000 678744 195039 432916 242837 160723 903689 7293065 21888277 21888277 10953440 10934837 1601462
1 5115.0 1428081 663797428676 846781778790 860166554925 6544101733836 99642 101050 200692 264622.431161 1428081 736438 691643 1352089 65007 3.36 2.78 82927 640876 234140 5610338 3595450 3554094 3554094 1837649 1716445 13994294 18710254 13323060 7102474 23868426 1012163 958641 11007087 1023650 10392959 1088542 1028122 990111 912087 908014 888197 906409 1016393 815633 699159 508500 349890 230272 255883 14596063 796406 820030 28954616 5795902 7332348 603396 1902087 11500677 28351220 1099136 601595 972153 998707 1339610 1837748 1220161 10211181 108000 21467 126710 446880 3229534 4993 11500677 7563093 3900291 5712914 5787763 200692 261231.7115 10619025 9978508 1049926 1010959 1068334 1146033 1057803 1000356 900336 893942 864949 855845 1054854 749300 623922 440199 284583 169339 142828 14358553 22771838 11608584 34.8 48504 35.8 49.5 57286 33.8 89454 173734 7624216 16954978 459123 454026 7616564 92692 1406614 3427384 466269 37515 23827 11999638 1572787 17453939 3267049 1771782 1571022 1696027 3267049 6286745 28820 28820 29707 14439 14381 2062089 1969600 21626112 2091984 20371467 2234575 2085925 1990467 1812423 1801956 1753146 1762254 2071247 1564933 1323081 948699 634473 399611 398711 110.8 913149 28954616 3924542 4037002 1554142 257841 546026 1102103 504579 298473 141680 25966 3941 232406 435495 27305 751696 718565 539687 401342 297639 111651 342816 282798 522498 225754 193715 190129 160088 240532 1662778 199271 827432 1492651 7383 1369349 27222 182557 574840 1656 145357 286509 195161 82795 95111 17082 114932 97451 70012 854973 411283 295295 344420 112278 4120 700747 410891 133118 94734 161445 243184 227922 183344 38365 84691 621868 44070 24312 72359 201481 199469 60997 21626112 124524 236631 510390 229203 148579 78268 11804 1715 123382 270425 15874 334179 322524 256069 194257 156003 54214 166876 141026 242077 106842 94754 92548 81196 118859 746527 76855 359005 603599 3263 582375 10984 106059 311328 831 73537 158365 91562 43855 55012 10078 56954 56138 36794 392512 198958 135159 153282 47834 2198 438819 218771 73760 51764 73393 116283 113907 88717 18279 32041 289865 21319 12423 18523 95654 64280 157 10211287 1249327 785312 392300 373927 178457 215169 344348 912772 712376 736276 2371624 752666 258831 670984 2543938 1519018 3382976 702334 1391880 10211287 11236543 28954616 27 4.8 671234 1025256 561071 985102 66551 15750 527935 20493 1095680 94609 6285595 19562731 19562731 9877750 9684981 1165365
2 5005.0 1774868 494056143933 721252426439 733561461654 5780147040071 57206 55978 113184 48359.759399 1774868 920657 854211 1234468 65662 3.27 2.59 95857 768205 451725 4524627 2844992 3202872 3202872 1720637 1482235 10297331 13980509 9750809 4711535 15422531 541010 622797 8316966 692667 7896904 736087 711718 665428 617325 653985 691792 725143 555213 671105 583941 447188 321376 227864 297383 10347030 556396 439969 20070143 4071725 4262278 575494 2207562 3920105 19494649 910026 562411 659740 628211 822195 1168671 908502 7524226 58228 16280 331729 299313 1562083 3773 3920105 1648699 3075758 1994498 1925607 113184 47126.3986 7603630 7176760 563187 645491 694720 735814 699391 649639 591431 624744 651555 664052 578913 595536 496269 361798 245015 158479 156451 9723113 16636184 7732110 39.0 51058 40.5 53.2 63751 37.6 87167 322649 5071787 9104863 369440 340441 6469341 54956 1758588 2871143 410568 83316 6187 10965280 866788 16150038 1645399 1699757 825459 819940 1645399 3928983 9960 9960 36550 5029 4931 1104197 1268288 15920596 1387387 15073664 1471901 1411109 1315067 1208756 1278729 1343347 1389195 1134126 1266641 1080210 808986 566391 386343 453834 425.9 709881 20070143 3595416 2182364 1012181 512090 105026 4623 566085 222285 250800 1375859 372083 36331 199329 565803 94595 113012 39543 373383 232188 170661 324706 344500 271067 329966 269307 19946 113275 239738 665 189396 20342 1016 1005 2888 696353 107184 38266 1333128 73019 173289 194976 25993 345965 23485 24115 145463 144351 204688 104636 1156 28446 11960 1150953 23619 17471 149676 107735 83723 278978 126444 50178 647696 52872 63074 73315 1056586 17171 106449 111054 39680 15920596 227930 45156 1971 245731 101807 129891 578041 153655 19294 114087 297684 42464 49670 19702 178348 115820 85493 169528 177703 127239 155409 132719 9562 57642 120941 284 63030 8326 352 535 1156 332041 60446 20774 569263 37915 95602 102941 13893 191240 11264 12914 83122 86221 98353 50421 584 14648 1916 521013 13514 9730 84095 58870 42581 150061 70282 28208 261620 17305 24745 34054 494486 4732 41867 10397 263 7524399 622595 687222 291132 832210 56996 880881 853619 111836 726892 603512 73683 1218982 398654 2497180 1108306 940871 2104912 239022 633845 7524399 8391638 20070143 7 5.3 546522 867239 152062 379625 179685 56246 246121 99717 374729 263656 3926227 12613979 12613979 6448602 6165377 977829
3 4133.0 585936 487005072197 613723856820 624450149363 6548612367402 40665 42463 83128 56491.338012 585936 316402 269534 1468305 59737 3.03 2.51 75281 803267 282862 5125816 2763015 3423250 3423250 1775199 1648051 9939670 14984858 9428446 5273287 15994410 540535 575794 8672285 647413 8288558 693040 652863 622949 602161 654907 696088 756439 556332 740359 711079 574407 426317 297361 348670 10667264 630616 434241 20875686 4066365 4142104 433652 1591194 5399203 20442034 951439 366646 868205 873200 1196903 1521148 970483 8152474 30738 13113 201778 241103 848135 3477 5399203 4060859 3663685 2732325 2666878 83128 53624.7587 8132434 7737236 561572 604324 667070 728403 671610 629910 591323 640640 666976 693978 574960 651105 617390 497457 358273 236773 224380 10208422 17479459 8404539 42.3 43866 43.9 55.4 52098 40.6 98640 212954 4819710 9694483 320999 306853 5579880 52390 572823 3221472 386749 50104 11742 11181203 770061 15476483 898239 2287450 433750 464489 898239 5193134 15219 15219 29913 7485 7734 1102107 1180118 16804719 1314483 16025794 1421443 1324473 1252859 1193484 1295547 1363064 1450417 1131292 1391464 1328469 1071864 784590 534134 573050 389.3 627852 20875686 2959407 2990780 1107202 139564 203442 252298 342663 283344 129690 129485 3407 78849 131796 30196 479436 544452 543860 408053 288055 142999 417240 573770 261579 85398 333616 2029 115622 143470 540715 227391 933973 104898 70517 460679 56767 240719 452235 0 207742 413860 143688 644510 279740 779970 766863 377196 100898 428649 183680 8535 297341 166979 48101 323008 451913 233004 178840 285711 217009 234897 250408 90659 40210 127174 79439 13767 21497 103498 109161 20707 16804719 64080 84617 112750 150048 139641 68081 53419 1152 40455 79640 18059 206336 237762 248795 195362 149440 70108 204783 289645 118846 39620 162626 1011 60130 70532 238120 80416 393622 42245 27259 185836 27665 135609 234795 0 103443 231898 69296 347422 155361 465971 402057 222582 59214 190835 81384 3488 138256 62390 20779 187750 229070 131273 90284 117945 108972 124281 117164 41705 15882 54240 35494 7223 4930 49689 35423 57 8152541 551136 659156 468362 154544 90042 163107 111977 692893 909338 452765 967498 802706 1652607 229713 1692280 1574873 2924108 1011180 720330 8152541 9790195 20875686 42 5.1 511224 1637654 351168 819037 78889 20495 557404 36949 600047 111697 5192714 15242062 15242062 7772764 7469298 1199573
4 3210.0 462360 315983343213 411902114464 418518490501 4125980999869 16036 16102 32138 45285.896438 462360 240313 222047 749637 61749 3.02 2.46 80493 806294 236846 3167219 1763503 1470953 1470953 765013 705940 6619516 9125523 6217293 3282447 9921694 335276 404682 5362136 433612 5076349 410643 397480 389122 375532 411895 447624 487329 355242 461925 408531 312098 231110 173218 235227 6642616 345422 268314 12992598 2573675 2724068 426311 1120165 987581 12566287 549498 299343 505620 485138 661013 933563 649666 5117219 13841 4066 72801 81708 393883 1223 987581 420059 2817515 484730 502851 32138 44742.7032 5010352 4726214 349790 417152 441081 428491 405440 392100 371081 405311 435283 463856 369830 429073 366389 265594 180573 120018 120580 6349982 10822050 5289824 41.4 46696 43.0 54.9 57362 39.8 126527 185452 2988934 3115252 161589 152711 3726095 18297 458294 1398152 232592 16338 3998 9877346 286064 12005017 410221 1270388 195431 214790 410221 3463374 5221 5221 32212 2622 2599 685066 821834 10372488 874693 9802563 839134 802920 781222 746613 817206 882907 951185 725072 890998 774920 577692 411683 293236 355807 290.4 314300 12992598 1653953 1457813 585404 162479 224406 22707 432943 210046 93639 202612 1754 84748 134652 24943 212966 62172 134424 548302 271213 517207 239410 553292 575890 903871 107575 38382 88283 504795 7672 14931 45556 6099 2557 6112 108325 136072 71952 14130 273695 196055 165969 5495 221381 17439 19227 190704 111879 144975 257849 36862 11142 18502 63122 23301 34327 146156 125056 113432 220217 317061 254390 17469 0 2886 271578 15924 0 143081 121146 29470 10372488 74277 98686 10729 196059 101319 45957 93730 645 45424 82738 12942 99476 28229 66028 267265 135979 258794 127103 278212 269579 435594 52290 18313 44342 263868 3585 6189 20132 2629 902 2884 53850 73109 39839 6765 137745 110110 84780 2896 116222 10022 10151 101801 66453 70968 124551 18223 5868 6096 31133 14285 17713 80722 66212 56799 116780 175679 129971 7816 0 1255 123001 7629 0 57457 25114 82 5117327 481070 210065 479229 139701 82571 185756 118011 193733 1067353 1083986 36321 506198 307545 287794 465570 1070547 1730882 522496 1039956 5117327 5703807 12992598 22 6.1 402223 586480 222750 599167 27840 4755 326829 6624 516090 45734 3463173 10297405 10297405 5261612 5035793 725053
In [153]:
import seaborn as sns
sns.set(rc={'figure.figsize':(18,8.27)})
# sns.heatmap(statetest3.corr().values, statetest.columns, statetest.columns, sort_f=False)
corr = test_newstate_df.corr()
# sns.heatmap(corr, xticklabels=corr.columns.values, yticklabels=corr.columns.values)
sns.heatmap(corr, vmin=-1.0, vmax=1.0)
Out[153]:
<matplotlib.axes._subplots.AxesSubplot at 0x1f4ac6e78d0>
In [ ]:
pd.plotting.scatter_matrix(test_newstate_df)
plt.show()

Run PCA

principal component analysis is a method of extracting important variables (in form of components) from a large set of variables available in a data set. It extracts low dimensional set of features from a high dimensional data set with a motive to capture as much information as possible. With fewer variables, visualization also becomes much more meaningful. Let’s say we have a data set of dimension 300 (n) × 50 (p). n represents the number of observations and p represents number of predictors. each resultant dimension is a linear combination of p features. PCA works on numeric variables only. Also the data needs to be normalized. PCA finds the best fit line by maximizing the sum of squared distances from projected points to origin.

In [252]:
test_newstate_df.shape
Out[252]:
(51, 337)
In [391]:
test_newstate_df.head()
Out[391]:
Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GQPOP_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPAI_CY HISPASN_CY HISPBLK_CY HISPMLT_CY HISPOTH_CY HISPPI_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPOTH_CY NHSPPI_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OLDRGENSCY OTHFBASECY OTHMBASECY OTHRACE_CY OWNER_CY PACIFIC_CY PAGEBASECY PCI_CY PIFBASE_CY PIMBASE_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SMCOLL_CY SOMEHS_CY TADULT01 TADULT02 TADULT03 TADULT04 TADULT05 TADULT06 TADULT07 TADULT08 TADULT09 TADULT11 TADULT12 TADULT13 TADULT14 TADULT15 TADULT16 TADULT17 TADULT18 TADULT19 TADULT20 TADULT21 TADULT22 TADULT23 TADULT24 TADULT25 TADULT26 TADULT27 TADULT28 TADULT29 TADULT30 TADULT31 TADULT32 TADULT33 TADULT34 TADULT35 TADULT36 TADULT37 TADULT38 TADULT39 TADULT40 TADULT41 TADULT42 TADULT43 TADULT44 TADULT45 TADULT46 TADULT47 TADULT48 TADULT49 TADULT50 TADULT51 TADULT52 TADULT53 TADULT54 TADULT55 TADULT56 TADULT57 TADULT58 TADULT59 TADULT60 TADULT61 TADULT62 TADULT63 TADULT64 TADULT65 TADULT66 TADULT67 TADULT68 TADULTBASE THH01 THH02 THH03 THH04 THH05 THH06 THH07 THH08 THH09 THH11 THH12 THH13 THH14 THH15 THH16 THH17 THH18 THH19 THH20 THH21 THH22 THH23 THH24 THH25 THH26 THH27 THH28 THH29 THH30 THH31 THH32 THH33 THH34 THH35 THH36 THH37 THH38 THH39 THH40 THH41 THH42 THH43 THH44 THH45 THH46 THH47 THH48 THH49 THH50 THH51 THH52 THH53 THH54 THH55 THH56 THH57 THH58 THH59 THH60 THH61 THH62 THH63 THH64 THH65 THH66 THH67 THH68 THHBASE THHGRPL1 THHGRPL11 THHGRPL12 THHGRPL13 THHGRPL14 THHGRPL2 THHGRPL3 THHGRPL4 THHGRPL5 THHGRPL6 THHGRPL7 THHGRPL8 THHGRPL9 THHGRPU1 THHGRPU2 THHGRPU3 THHGRPU4 THHGRPU5 THHGRPU6 TOTHH_CY TOTHU_CY TOTPOP_CY TSEGNUM UNEMPRT_CY UNEMP_CY VACANT_CY VAL0_CY VAL150K_CY VAL1M_CY VAL1PT5MCY VAL250K_CY VAL2M_CY VAL50K_CY VAL750K_CY VALBASE_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
0 7353.0 5808539 984770070408 1341852609490 1363545956974 10953288740347 186300 188412 374712 158042.920912 5808539 3057816 2750723 2056384 73844 3.50 2.92 100620 821339 637422 8055682 5552919 2345048 2345048 1186331 1158717 19595308 26629106 18678853 9166028 32063051 1246195 1267704 15535129 1399534 14709444 1533458 1442776 1332317 1220853 1252603 1262625 1290328 1247274 1173091 1008278 746364 527232 362402 447803 20024285 621048 1008060 39806791 8011720 9289070 813593 3342632 15757962 38993198 1280615 1084396 1102410 1036596 1486913 2149782 1630222 13335897 214901 94837 149373 953706 7017528 17243 15757962 7310374 4804568 7811593 7946369 374712 155779.2198 15076422 14203971 1298461 1348980 1481021 1618901 1503701 1378564 1227529 1251002 1245261 1228175 1301504 1076510 891235 637267 427533 272897 270401 19782506 32126345 15627854 36.2 56020 37.3 51.5 69051 35.1 99297 505800 10636136 25228888 1076167 1053726 11926897 159811 5713702 2195675 1176187 84542 141009 14577903 2557052 24048829 7102070 2806123 3484353 3617717 7102070 7294468 158252 158252 34254 79878 78374 2544656 2616684 30611551 2880555 28913415 3152359 2946477 2710881 2448382 2503605 2507886 2518503 2548778 2249601 1899513 1383631 954765 635299 718204 255.5 2129893 39806791 6041636 5627462 2067041 962752 447008 877339 707623 1030736 998289 1614673 1324877 854053 428180 1051926 640890 507501 147970 237918 290669 232487 111099 175840 175248 27484 508845 34216 94745 26920 657657 2654588 898660 530885 587455 321133 1177243 208733 337293 394628 476335 299210 59480 140493 366232 156521 289040 189701 202710 74475 54655 10628 210357 24920 79246 244837 409205 166215 21790 118065 25748 113377 9029 1432303 1875298 534518 504305 79548 103401 172871 214308 121327 30611551 435771 183824 367891 297569 476909 507339 673663 508597 428604 259020 577307 263847 213335 66627 109074 143993 108873 52243 85167 78061 12137 244469 15552 49244 13249 260783 911215 362738 195394 210403 128040 543776 111747 169541 165386 226491 161769 28909 76061 193740 98928 146079 107181 112822 31553 22139 5084 95731 9515 37825 135236 200618 89406 11253 50951 12199 59308 4548 605661 641139 209939 214632 38327 25756 76824 50008 179 13336104 1761964 474338 127006 1709698 152588 2118203 1161232 543809 499350 412712 2068573 1407619 734811 1827341 4374461 1267838 4807134 591397 467754 13336104 14383561 39806791 28 4.7 916455 1047457 190476 277000 678744 195039 432916 242837 160723 903689 7293065 21888277 21888277 10953440 10934837 1601462
1 5115.0 1428081 663797428676 846781778790 860166554925 6544101733836 99642 101050 200692 264622.431161 1428081 736438 691643 1352089 65007 3.36 2.78 82927 640876 234140 5610338 3595450 3554094 3554094 1837649 1716445 13994294 18710254 13323060 7102474 23868426 1012163 958641 11007087 1023650 10392959 1088542 1028122 990111 912087 908014 888197 906409 1016393 815633 699159 508500 349890 230272 255883 14596063 796406 820030 28954616 5795902 7332348 603396 1902087 11500677 28351220 1099136 601595 972153 998707 1339610 1837748 1220161 10211181 108000 21467 126710 446880 3229534 4993 11500677 7563093 3900291 5712914 5787763 200692 261231.7115 10619025 9978508 1049926 1010959 1068334 1146033 1057803 1000356 900336 893942 864949 855845 1054854 749300 623922 440199 284583 169339 142828 14358553 22771838 11608584 34.8 48504 35.8 49.5 57286 33.8 89454 173734 7624216 16954978 459123 454026 7616564 92692 1406614 3427384 466269 37515 23827 11999638 1572787 17453939 3267049 1771782 1571022 1696027 3267049 6286745 28820 28820 29707 14439 14381 2062089 1969600 21626112 2091984 20371467 2234575 2085925 1990467 1812423 1801956 1753146 1762254 2071247 1564933 1323081 948699 634473 399611 398711 110.8 913149 28954616 3924542 4037002 1554142 257841 546026 1102103 504579 298473 141680 25966 3941 232406 435495 27305 751696 718565 539687 401342 297639 111651 342816 282798 522498 225754 193715 190129 160088 240532 1662778 199271 827432 1492651 7383 1369349 27222 182557 574840 1656 145357 286509 195161 82795 95111 17082 114932 97451 70012 854973 411283 295295 344420 112278 4120 700747 410891 133118 94734 161445 243184 227922 183344 38365 84691 621868 44070 24312 72359 201481 199469 60997 21626112 124524 236631 510390 229203 148579 78268 11804 1715 123382 270425 15874 334179 322524 256069 194257 156003 54214 166876 141026 242077 106842 94754 92548 81196 118859 746527 76855 359005 603599 3263 582375 10984 106059 311328 831 73537 158365 91562 43855 55012 10078 56954 56138 36794 392512 198958 135159 153282 47834 2198 438819 218771 73760 51764 73393 116283 113907 88717 18279 32041 289865 21319 12423 18523 95654 64280 157 10211287 1249327 785312 392300 373927 178457 215169 344348 912772 712376 736276 2371624 752666 258831 670984 2543938 1519018 3382976 702334 1391880 10211287 11236543 28954616 27 4.8 671234 1025256 561071 985102 66551 15750 527935 20493 1095680 94609 6285595 19562731 19562731 9877750 9684981 1165365
2 5005.0 1774868 494056143933 721252426439 733561461654 5780147040071 57206 55978 113184 48359.759399 1774868 920657 854211 1234468 65662 3.27 2.59 95857 768205 451725 4524627 2844992 3202872 3202872 1720637 1482235 10297331 13980509 9750809 4711535 15422531 541010 622797 8316966 692667 7896904 736087 711718 665428 617325 653985 691792 725143 555213 671105 583941 447188 321376 227864 297383 10347030 556396 439969 20070143 4071725 4262278 575494 2207562 3920105 19494649 910026 562411 659740 628211 822195 1168671 908502 7524226 58228 16280 331729 299313 1562083 3773 3920105 1648699 3075758 1994498 1925607 113184 47126.3986 7603630 7176760 563187 645491 694720 735814 699391 649639 591431 624744 651555 664052 578913 595536 496269 361798 245015 158479 156451 9723113 16636184 7732110 39.0 51058 40.5 53.2 63751 37.6 87167 322649 5071787 9104863 369440 340441 6469341 54956 1758588 2871143 410568 83316 6187 10965280 866788 16150038 1645399 1699757 825459 819940 1645399 3928983 9960 9960 36550 5029 4931 1104197 1268288 15920596 1387387 15073664 1471901 1411109 1315067 1208756 1278729 1343347 1389195 1134126 1266641 1080210 808986 566391 386343 453834 425.9 709881 20070143 3595416 2182364 1012181 512090 105026 4623 566085 222285 250800 1375859 372083 36331 199329 565803 94595 113012 39543 373383 232188 170661 324706 344500 271067 329966 269307 19946 113275 239738 665 189396 20342 1016 1005 2888 696353 107184 38266 1333128 73019 173289 194976 25993 345965 23485 24115 145463 144351 204688 104636 1156 28446 11960 1150953 23619 17471 149676 107735 83723 278978 126444 50178 647696 52872 63074 73315 1056586 17171 106449 111054 39680 15920596 227930 45156 1971 245731 101807 129891 578041 153655 19294 114087 297684 42464 49670 19702 178348 115820 85493 169528 177703 127239 155409 132719 9562 57642 120941 284 63030 8326 352 535 1156 332041 60446 20774 569263 37915 95602 102941 13893 191240 11264 12914 83122 86221 98353 50421 584 14648 1916 521013 13514 9730 84095 58870 42581 150061 70282 28208 261620 17305 24745 34054 494486 4732 41867 10397 263 7524399 622595 687222 291132 832210 56996 880881 853619 111836 726892 603512 73683 1218982 398654 2497180 1108306 940871 2104912 239022 633845 7524399 8391638 20070143 7 5.3 546522 867239 152062 379625 179685 56246 246121 99717 374729 263656 3926227 12613979 12613979 6448602 6165377 977829
3 4133.0 585936 487005072197 613723856820 624450149363 6548612367402 40665 42463 83128 56491.338012 585936 316402 269534 1468305 59737 3.03 2.51 75281 803267 282862 5125816 2763015 3423250 3423250 1775199 1648051 9939670 14984858 9428446 5273287 15994410 540535 575794 8672285 647413 8288558 693040 652863 622949 602161 654907 696088 756439 556332 740359 711079 574407 426317 297361 348670 10667264 630616 434241 20875686 4066365 4142104 433652 1591194 5399203 20442034 951439 366646 868205 873200 1196903 1521148 970483 8152474 30738 13113 201778 241103 848135 3477 5399203 4060859 3663685 2732325 2666878 83128 53624.7587 8132434 7737236 561572 604324 667070 728403 671610 629910 591323 640640 666976 693978 574960 651105 617390 497457 358273 236773 224380 10208422 17479459 8404539 42.3 43866 43.9 55.4 52098 40.6 98640 212954 4819710 9694483 320999 306853 5579880 52390 572823 3221472 386749 50104 11742 11181203 770061 15476483 898239 2287450 433750 464489 898239 5193134 15219 15219 29913 7485 7734 1102107 1180118 16804719 1314483 16025794 1421443 1324473 1252859 1193484 1295547 1363064 1450417 1131292 1391464 1328469 1071864 784590 534134 573050 389.3 627852 20875686 2959407 2990780 1107202 139564 203442 252298 342663 283344 129690 129485 3407 78849 131796 30196 479436 544452 543860 408053 288055 142999 417240 573770 261579 85398 333616 2029 115622 143470 540715 227391 933973 104898 70517 460679 56767 240719 452235 0 207742 413860 143688 644510 279740 779970 766863 377196 100898 428649 183680 8535 297341 166979 48101 323008 451913 233004 178840 285711 217009 234897 250408 90659 40210 127174 79439 13767 21497 103498 109161 20707 16804719 64080 84617 112750 150048 139641 68081 53419 1152 40455 79640 18059 206336 237762 248795 195362 149440 70108 204783 289645 118846 39620 162626 1011 60130 70532 238120 80416 393622 42245 27259 185836 27665 135609 234795 0 103443 231898 69296 347422 155361 465971 402057 222582 59214 190835 81384 3488 138256 62390 20779 187750 229070 131273 90284 117945 108972 124281 117164 41705 15882 54240 35494 7223 4930 49689 35423 57 8152541 551136 659156 468362 154544 90042 163107 111977 692893 909338 452765 967498 802706 1652607 229713 1692280 1574873 2924108 1011180 720330 8152541 9790195 20875686 42 5.1 511224 1637654 351168 819037 78889 20495 557404 36949 600047 111697 5192714 15242062 15242062 7772764 7469298 1199573
4 3210.0 462360 315983343213 411902114464 418518490501 4125980999869 16036 16102 32138 45285.896438 462360 240313 222047 749637 61749 3.02 2.46 80493 806294 236846 3167219 1763503 1470953 1470953 765013 705940 6619516 9125523 6217293 3282447 9921694 335276 404682 5362136 433612 5076349 410643 397480 389122 375532 411895 447624 487329 355242 461925 408531 312098 231110 173218 235227 6642616 345422 268314 12992598 2573675 2724068 426311 1120165 987581 12566287 549498 299343 505620 485138 661013 933563 649666 5117219 13841 4066 72801 81708 393883 1223 987581 420059 2817515 484730 502851 32138 44742.7032 5010352 4726214 349790 417152 441081 428491 405440 392100 371081 405311 435283 463856 369830 429073 366389 265594 180573 120018 120580 6349982 10822050 5289824 41.4 46696 43.0 54.9 57362 39.8 126527 185452 2988934 3115252 161589 152711 3726095 18297 458294 1398152 232592 16338 3998 9877346 286064 12005017 410221 1270388 195431 214790 410221 3463374 5221 5221 32212 2622 2599 685066 821834 10372488 874693 9802563 839134 802920 781222 746613 817206 882907 951185 725072 890998 774920 577692 411683 293236 355807 290.4 314300 12992598 1653953 1457813 585404 162479 224406 22707 432943 210046 93639 202612 1754 84748 134652 24943 212966 62172 134424 548302 271213 517207 239410 553292 575890 903871 107575 38382 88283 504795 7672 14931 45556 6099 2557 6112 108325 136072 71952 14130 273695 196055 165969 5495 221381 17439 19227 190704 111879 144975 257849 36862 11142 18502 63122 23301 34327 146156 125056 113432 220217 317061 254390 17469 0 2886 271578 15924 0 143081 121146 29470 10372488 74277 98686 10729 196059 101319 45957 93730 645 45424 82738 12942 99476 28229 66028 267265 135979 258794 127103 278212 269579 435594 52290 18313 44342 263868 3585 6189 20132 2629 902 2884 53850 73109 39839 6765 137745 110110 84780 2896 116222 10022 10151 101801 66453 70968 124551 18223 5868 6096 31133 14285 17713 80722 66212 56799 116780 175679 129971 7816 0 1255 123001 7629 0 57457 25114 82 5117327 481070 210065 479229 139701 82571 185756 118011 193733 1067353 1083986 36321 506198 307545 287794 465570 1070547 1730882 522496 1039956 5117327 5703807 12992598 22 6.1 402223 586480 222750 599167 27840 4755 326829 6624 516090 45734 3463173 10297405 10297405 5261612 5035793 725053

Get a list of columns and their location

In [403]:
[(test_newstate_df.columns.get_loc(c),c) for c in test_newstate_df]
Out[403]:
[(0, 'Provider_Count'),
 (1, 'AAGEBASECY'),
 (2, 'AGGDI_CY'),
 (3, 'AGGHINC_CY'),
 (4, 'AGGINC_CY'),
 (5, 'AGGNW_CY'),
 (6, 'AIFBASE_CY'),
 (7, 'AIMBASE_CY'),
 (8, 'AMERIND_CY'),
 (9, 'AREA'),
 (10, 'ASIAN_CY'),
 (11, 'ASNFBASECY'),
 (12, 'ASNMBASECY'),
 (13, 'ASSCDEG_CY'),
 (14, 'AVGDI_CY'),
 (15, 'AVGFMSZ_CY'),
 (16, 'AVGHHSZ_CY'),
 (17, 'AVGHINC_CY'),
 (18, 'AVGNW_CY'),
 (19, 'AVGVAL_CY'),
 (20, 'BABYBOOMCY'),
 (21, 'BACHDEG_CY'),
 (22, 'BAGEBASECY'),
 (23, 'BLACK_CY'),
 (24, 'BLKFBASECY'),
 (25, 'BLKMBASECY'),
 (26, 'CIVLBFR_CY'),
 (27, 'EDUCBASECY'),
 (28, 'EMP_CY'),
 (29, 'FAMHH_CY'),
 (30, 'FAMPOP_CY'),
 (31, 'FEM0_CY'),
 (32, 'FEM15_CY'),
 (33, 'FEM18UP_CY'),
 (34, 'FEM20_CY'),
 (35, 'FEM21UP_CY'),
 (36, 'FEM25_CY'),
 (37, 'FEM30_CY'),
 (38, 'FEM35_CY'),
 (39, 'FEM40_CY'),
 (40, 'FEM45_CY'),
 (41, 'FEM50_CY'),
 (42, 'FEM55_CY'),
 (43, 'FEM5_CY'),
 (44, 'FEM60_CY'),
 (45, 'FEM65_CY'),
 (46, 'FEM70_CY'),
 (47, 'FEM75_CY'),
 (48, 'FEM80_CY'),
 (49, 'FEM85_CY'),
 (50, 'FEMALES_CY'),
 (51, 'GED_CY'),
 (52, 'GENALPHACY'),
 (53, 'GENBASE_CY'),
 (54, 'GENX_CY'),
 (55, 'GENZ_CY'),
 (56, 'GQPOP_CY'),
 (57, 'GRADDEG_CY'),
 (58, 'HAGEBASECY'),
 (59, 'HHPOP_CY'),
 (60, 'HINC0_CY'),
 (61, 'HINC150_CY'),
 (62, 'HINC15_CY'),
 (63, 'HINC25_CY'),
 (64, 'HINC35_CY'),
 (65, 'HINC50_CY'),
 (66, 'HINC75_CY'),
 (67, 'HINCBASECY'),
 (68, 'HISPAI_CY'),
 (69, 'HISPASN_CY'),
 (70, 'HISPBLK_CY'),
 (71, 'HISPMLT_CY'),
 (72, 'HISPOTH_CY'),
 (73, 'HISPPI_CY'),
 (74, 'HISPPOP_CY'),
 (75, 'HISPWHT_CY'),
 (76, 'HSGRAD_CY'),
 (77, 'HSPFBASECY'),
 (78, 'HSPMBASECY'),
 (79, 'IAGEBASECY'),
 (80, 'LANDAREA'),
 (81, 'MAL18UP_CY'),
 (82, 'MAL21UP_CY'),
 (83, 'MALE0_CY'),
 (84, 'MALE15_CY'),
 (85, 'MALE20_CY'),
 (86, 'MALE25_CY'),
 (87, 'MALE30_CY'),
 (88, 'MALE35_CY'),
 (89, 'MALE40_CY'),
 (90, 'MALE45_CY'),
 (91, 'MALE50_CY'),
 (92, 'MALE55_CY'),
 (93, 'MALE5_CY'),
 (94, 'MALE60_CY'),
 (95, 'MALE65_CY'),
 (96, 'MALE70_CY'),
 (97, 'MALE75_CY'),
 (98, 'MALE80_CY'),
 (99, 'MALE85_CY'),
 (100, 'MALES_CY'),
 (101, 'MARBASE_CY'),
 (102, 'MARRIED_CY'),
 (103, 'MEDAGE_CY'),
 (104, 'MEDDI_CY'),
 (105, 'MEDFAGE_CY'),
 (106, 'MEDHHR_CY'),
 (107, 'MEDHINC_CY'),
 (108, 'MEDMAGE_CY'),
 (109, 'MEDNW_CY'),
 (110, 'MEDVAL_CY'),
 (111, 'MILLENN_CY'),
 (112, 'MINORITYCY'),
 (113, 'MLTFBASECY'),
 (114, 'MLTMBASECY'),
 (115, 'NEVMARR_CY'),
 (116, 'NHSPAI_CY'),
 (117, 'NHSPASN_CY'),
 (118, 'NHSPBLK_CY'),
 (119, 'NHSPMLT_CY'),
 (120, 'NHSPOTH_CY'),
 (121, 'NHSPPI_CY'),
 (122, 'NHSPWHT_CY'),
 (123, 'NOHS_CY'),
 (124, 'NONHISP_CY'),
 (125, 'OAGEBASECY'),
 (126, 'OLDRGENSCY'),
 (127, 'OTHFBASECY'),
 (128, 'OTHMBASECY'),
 (129, 'OTHRACE_CY'),
 (130, 'OWNER_CY'),
 (131, 'PACIFIC_CY'),
 (132, 'PAGEBASECY'),
 (133, 'PCI_CY'),
 (134, 'PIFBASE_CY'),
 (135, 'PIMBASE_CY'),
 (136, 'POP0_CY'),
 (137, 'POP15_CY'),
 (138, 'POP18UP_CY'),
 (139, 'POP20_CY'),
 (140, 'POP21UP_CY'),
 (141, 'POP25_CY'),
 (142, 'POP30_CY'),
 (143, 'POP35_CY'),
 (144, 'POP40_CY'),
 (145, 'POP45_CY'),
 (146, 'POP50_CY'),
 (147, 'POP55_CY'),
 (148, 'POP5_CY'),
 (149, 'POP60_CY'),
 (150, 'POP65_CY'),
 (151, 'POP70_CY'),
 (152, 'POP75_CY'),
 (153, 'POP80_CY'),
 (154, 'POP85_CY'),
 (155, 'POPDENS_CY'),
 (156, 'RACE2UP_CY'),
 (157, 'RACEBASECY'),
 (158, 'RENTER_CY'),
 (159, 'SMCOLL_CY'),
 (160, 'SOMEHS_CY'),
 (161, 'TADULT01'),
 (162, 'TADULT02'),
 (163, 'TADULT03'),
 (164, 'TADULT04'),
 (165, 'TADULT05'),
 (166, 'TADULT06'),
 (167, 'TADULT07'),
 (168, 'TADULT08'),
 (169, 'TADULT09'),
 (170, 'TADULT11'),
 (171, 'TADULT12'),
 (172, 'TADULT13'),
 (173, 'TADULT14'),
 (174, 'TADULT15'),
 (175, 'TADULT16'),
 (176, 'TADULT17'),
 (177, 'TADULT18'),
 (178, 'TADULT19'),
 (179, 'TADULT20'),
 (180, 'TADULT21'),
 (181, 'TADULT22'),
 (182, 'TADULT23'),
 (183, 'TADULT24'),
 (184, 'TADULT25'),
 (185, 'TADULT26'),
 (186, 'TADULT27'),
 (187, 'TADULT28'),
 (188, 'TADULT29'),
 (189, 'TADULT30'),
 (190, 'TADULT31'),
 (191, 'TADULT32'),
 (192, 'TADULT33'),
 (193, 'TADULT34'),
 (194, 'TADULT35'),
 (195, 'TADULT36'),
 (196, 'TADULT37'),
 (197, 'TADULT38'),
 (198, 'TADULT39'),
 (199, 'TADULT40'),
 (200, 'TADULT41'),
 (201, 'TADULT42'),
 (202, 'TADULT43'),
 (203, 'TADULT44'),
 (204, 'TADULT45'),
 (205, 'TADULT46'),
 (206, 'TADULT47'),
 (207, 'TADULT48'),
 (208, 'TADULT49'),
 (209, 'TADULT50'),
 (210, 'TADULT51'),
 (211, 'TADULT52'),
 (212, 'TADULT53'),
 (213, 'TADULT54'),
 (214, 'TADULT55'),
 (215, 'TADULT56'),
 (216, 'TADULT57'),
 (217, 'TADULT58'),
 (218, 'TADULT59'),
 (219, 'TADULT60'),
 (220, 'TADULT61'),
 (221, 'TADULT62'),
 (222, 'TADULT63'),
 (223, 'TADULT64'),
 (224, 'TADULT65'),
 (225, 'TADULT66'),
 (226, 'TADULT67'),
 (227, 'TADULT68'),
 (228, 'TADULTBASE'),
 (229, 'THH01'),
 (230, 'THH02'),
 (231, 'THH03'),
 (232, 'THH04'),
 (233, 'THH05'),
 (234, 'THH06'),
 (235, 'THH07'),
 (236, 'THH08'),
 (237, 'THH09'),
 (238, 'THH11'),
 (239, 'THH12'),
 (240, 'THH13'),
 (241, 'THH14'),
 (242, 'THH15'),
 (243, 'THH16'),
 (244, 'THH17'),
 (245, 'THH18'),
 (246, 'THH19'),
 (247, 'THH20'),
 (248, 'THH21'),
 (249, 'THH22'),
 (250, 'THH23'),
 (251, 'THH24'),
 (252, 'THH25'),
 (253, 'THH26'),
 (254, 'THH27'),
 (255, 'THH28'),
 (256, 'THH29'),
 (257, 'THH30'),
 (258, 'THH31'),
 (259, 'THH32'),
 (260, 'THH33'),
 (261, 'THH34'),
 (262, 'THH35'),
 (263, 'THH36'),
 (264, 'THH37'),
 (265, 'THH38'),
 (266, 'THH39'),
 (267, 'THH40'),
 (268, 'THH41'),
 (269, 'THH42'),
 (270, 'THH43'),
 (271, 'THH44'),
 (272, 'THH45'),
 (273, 'THH46'),
 (274, 'THH47'),
 (275, 'THH48'),
 (276, 'THH49'),
 (277, 'THH50'),
 (278, 'THH51'),
 (279, 'THH52'),
 (280, 'THH53'),
 (281, 'THH54'),
 (282, 'THH55'),
 (283, 'THH56'),
 (284, 'THH57'),
 (285, 'THH58'),
 (286, 'THH59'),
 (287, 'THH60'),
 (288, 'THH61'),
 (289, 'THH62'),
 (290, 'THH63'),
 (291, 'THH64'),
 (292, 'THH65'),
 (293, 'THH66'),
 (294, 'THH67'),
 (295, 'THH68'),
 (296, 'THHBASE'),
 (297, 'THHGRPL1'),
 (298, 'THHGRPL11'),
 (299, 'THHGRPL12'),
 (300, 'THHGRPL13'),
 (301, 'THHGRPL14'),
 (302, 'THHGRPL2'),
 (303, 'THHGRPL3'),
 (304, 'THHGRPL4'),
 (305, 'THHGRPL5'),
 (306, 'THHGRPL6'),
 (307, 'THHGRPL7'),
 (308, 'THHGRPL8'),
 (309, 'THHGRPL9'),
 (310, 'THHGRPU1'),
 (311, 'THHGRPU2'),
 (312, 'THHGRPU3'),
 (313, 'THHGRPU4'),
 (314, 'THHGRPU5'),
 (315, 'THHGRPU6'),
 (316, 'TOTHH_CY'),
 (317, 'TOTHU_CY'),
 (318, 'TOTPOP_CY'),
 (319, 'TSEGNUM'),
 (320, 'UNEMPRT_CY'),
 (321, 'UNEMP_CY'),
 (322, 'VACANT_CY'),
 (323, 'VAL0_CY'),
 (324, 'VAL150K_CY'),
 (325, 'VAL1M_CY'),
 (326, 'VAL1PT5MCY'),
 (327, 'VAL250K_CY'),
 (328, 'VAL2M_CY'),
 (329, 'VAL50K_CY'),
 (330, 'VAL750K_CY'),
 (331, 'VALBASE_CY'),
 (332, 'WAGEBASECY'),
 (333, 'WHITE_CY'),
 (334, 'WHTFBASECY'),
 (335, 'WHTMBASECY'),
 (336, 'WIDOWED_CY')]

PCA Using Standard Scalar

In [22]:
# Standard Scalar
from sklearn.preprocessing import StandardScaler
sc_state = StandardScaler()
newstate_df_std = sc_state.fit_transform(test_newstate_df)
In [ ]:
from sklearn.preprocessing import PowerTransformer
pt_state = PowerTransformer(method='yeo-johnson')
newstate_df_pt = pt_state.fit_transform(test_newstate_df)
In [23]:
# Import and fit PCA
from sklearn.decomposition import PCA
# pca_statetest = PCA().fit(newstate_df_std)
# pca_newstate = pca_statetest.transform(newstate_df_std)
pca_statetest = PCA(n_components=8)
pca_newstate = pca_statetest.fit_transform(newstate_df_std)
In [24]:
pca_statetest.components_
Out[24]:
array([[ 0.067079  ,  0.05809787,  0.06796729, ...,  0.06698423,
         0.06715825,  0.0671426 ],
       [-0.00357032,  0.07835758,  0.00763204, ..., -0.02473751,
        -0.02266122, -0.01930669],
       [ 0.03209029,  0.00308058,  0.00831319, ...,  0.01021552,
         0.00718204,  0.0188534 ],
       ...,
       [ 0.02761109, -0.02721144,  0.00358023, ..., -0.00915768,
        -0.01188302,  0.01111088],
       [-0.00190508, -0.02394761, -0.00424891, ...,  0.01495248,
         0.01407101, -0.00246226],
       [-0.00147688,  0.0013432 , -0.01253322, ..., -0.0157983 ,
        -0.01461408, -0.0041321 ]])
In [25]:
pca_statetest.explained_variance_ratio_
Out[25]:
array([0.63796413, 0.11235257, 0.05632679, 0.03036847, 0.02757483,
       0.02411164, 0.01938572, 0.01406097])

Scree Plot showing variation explained by each PC

In [26]:
# Show percentage of variance explained by different principal components
sns.set(rc={'figure.figsize':(7,7)})
labels = ['PC' + str(x) for x in range(1,9)]
plt.plot(np.cumsum(pca_statetest.explained_variance_ratio_))
plt.bar(x=range(0,8), height=pca_statetest.explained_variance_ratio_, tick_label = labels)
plt.xlabel('Number of components')
# plt.yticks(range(0,1,0.1))
# plt.ylim(bottom=0.90)
plt.ylabel('Cumulative explained variance');

The variance explained by PC1 is ~64% and the cumulative variance explained by first 5 components is ~86.5%.

Plot first 2 PCs

In [267]:
# Create df for PCs with State Labels
pca_df = pd.DataFrame(data=pca_newstate, index=newstate_obgyn_df.RegionAbbr, columns = ['PC1','PC2','PC3','PC4','PC5','PC6','PC7','PC8'])
pca_df
Out[267]:
PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8
RegionAbbr
CA 67.320404 25.177160 -3.101485 -4.706037 4.407026 -5.775390 -2.811014 -0.146043
TX 43.191556 -10.699602 -15.687442 -0.315688 -10.453568 3.322438 3.345736 -4.351121
NY 26.419407 3.238080 15.933188 -5.934788 1.347212 10.766314 8.520713 0.926305
FL 31.432822 -12.900757 -0.393267 14.717084 10.657921 0.852195 2.207121 1.376193
PA 13.531901 -8.907294 10.182844 0.293992 -2.072087 -4.840718 -2.510874 -1.370546
IL 12.417125 -3.635323 4.527603 -0.628122 -3.899572 -0.172909 -2.054802 0.271814
MI 7.217125 -10.407115 5.212897 -2.265537 -0.960765 -4.309118 0.029509 2.223657
OH 10.338226 -12.537128 7.279680 -2.746292 -1.933483 -5.282655 -0.098395 2.661954
NJ 4.728497 7.498301 5.688313 3.692673 -2.532585 3.866985 -2.258937 -2.237845
GA 7.547692 -6.710732 -4.032778 -1.570728 -0.257958 5.436692 -5.449393 2.504245
NC 8.038400 -7.848564 -3.433742 -1.721384 2.439704 2.483189 -3.253880 1.830589
VA 4.503082 -0.000169 0.672323 1.913937 -3.322481 1.700228 -3.637186 -0.418838
MA 1.282166 6.055139 5.967845 4.164720 -2.779457 1.181995 -1.456220 -2.180047
MD -0.441701 3.928366 2.364572 4.031252 -3.604813 2.952363 -3.518543 -0.148252
MO -0.698659 -4.567963 0.932780 -1.230552 -0.061544 -1.911370 -0.223808 0.420068
WA 3.281982 3.186541 -0.230398 3.429841 -1.409232 -2.330611 -0.260901 2.168421
AZ 2.376126 0.789323 -5.752435 2.984429 2.584803 -0.532572 5.620356 1.256825
IN -0.342637 -5.899252 2.172777 -2.984052 -1.289292 -3.436518 0.616144 1.555948
TN 0.079788 -5.418673 -0.295000 -2.671651 1.977797 0.962691 -2.925767 -0.271666
CO -0.772431 2.227808 -1.598518 2.964669 -3.123626 -0.621338 0.963963 0.414342
SC -3.111514 -3.274919 -1.991848 -1.300529 3.252373 2.473097 -2.832687 0.298146
CT -5.413854 4.798944 3.710933 4.236997 -2.277963 0.544973 -1.859746 -2.321968
LA -3.581901 -3.539782 -2.332202 -2.804084 2.367840 2.844284 -2.603643 0.000065
MN -1.454759 -0.622348 0.768827 2.276174 -3.472325 -2.768814 1.574324 -0.337149
WI -1.285486 -3.390711 2.253455 0.057863 -1.703981 -4.243503 1.522183 -0.247803
KY -4.590302 -3.140127 -1.049884 -3.308739 2.250637 0.062161 -1.280529 -1.827113
AL -3.570830 -4.164563 -1.423220 -3.164216 2.903233 2.307430 -3.509442 -0.372152
OR -3.862786 1.427036 -0.443500 2.416649 1.343724 -1.949341 0.876820 -0.158645
OK -4.495779 -1.361834 -3.105018 -3.951288 1.807075 -1.827505 3.818706 0.681093
MS -7.501089 -2.003411 -2.217468 -3.664372 3.327493 2.845254 -2.441301 -0.122287
NV -6.581356 2.652540 -2.832970 0.693487 0.786875 0.561275 1.432138 1.215541
UT -6.831176 3.590845 -3.854658 0.185379 -3.358245 0.908831 0.786651 5.289378
KS -7.122027 0.276723 -0.867313 -1.133046 -1.212334 -1.468594 1.855928 0.185332
IA -7.047168 -0.692963 0.517779 -1.237969 -1.368690 -3.127834 2.332365 -1.073142
AR -7.352917 -1.480066 -1.769965 -2.931082 2.997852 0.493442 -0.701777 -0.915410
NM -8.160223 1.737526 -3.413789 -1.572444 2.912151 -0.121008 2.905147 -0.173036
HI -8.395282 9.076429 -1.174982 1.055486 -0.345158 -1.317902 -2.715543 6.841207
NE -9.341990 1.425450 -0.998756 -0.901640 -0.879588 -1.076031 2.153185 -0.367484
WV -9.832298 -0.713482 -0.727067 -2.904878 3.543541 -0.540629 -0.484177 -4.985301
DC -11.485659 5.451734 0.516645 1.684653 -2.798453 3.776787 -0.524282 2.941622
RI -10.795428 3.588724 0.789578 1.185230 0.423904 0.171334 -0.456088 -1.892776
NH -10.344747 3.464786 1.295601 2.833957 -0.707908 -0.410803 -0.556011 -2.257321
ID -9.677239 1.792361 -1.934014 -1.027773 0.192167 -0.325320 1.408168 0.853828
DE -11.094500 3.324309 0.118532 1.415230 0.149220 0.565963 -0.544958 -1.095819
ME -10.374494 1.575919 0.810365 0.686126 2.447631 -1.300093 0.302217 -3.736477
MT -10.774798 1.862764 -0.845265 -0.572628 1.772330 -1.109617 1.917061 -1.859826
AK -10.880967 4.775845 -3.105081 0.538624 -2.186515 1.112020 2.604951 4.029744
VT -11.859212 2.796808 0.569223 0.907925 1.506416 -0.579738 -0.021773 -3.186915
SD -11.292890 2.405303 -1.424176 -0.907701 0.628139 -0.664910 1.986350 -0.698878
WY -11.878690 3.039309 -1.161336 -0.089128 0.301224 0.210282 0.711577 -0.421634
ND -11.459512 2.752705 -1.088186 -0.120025 -0.316664 -0.357381 1.500362 -0.770826
In [307]:
per_var = np.round(pca_statetest.explained_variance_ratio_*100, decimals=1)
plt.scatter(pca_df.PC1, pca_df.PC2)
plt.xlabel('PC1 - {0}%'.format(per_var[0]))
plt.ylabel('PC2 - {0}%'.format(per_var[1]))
for sample in pca_df.index:
    plt.annotate(sample, (pca_df.PC1.loc[sample],pca_df.PC2.loc[sample]))

This graph of first 2 components suggest that the cluster of states on the left (DC, UT, AK, CT) are correlated with each other. Similarly states in the bottom center (GA, NC, MI etc) are correlated with each other. The separation of 2 clusters along x-axis suggests that states towards the left are very different from states towards the right.

Check loadings of PCs

In [258]:
componentdf = pd.DataFrame(data=pca_statetest.components_, columns = test_newstate_df.columns)
componentdf.head()
Out[258]:
Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GQPOP_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPAI_CY HISPASN_CY HISPBLK_CY HISPMLT_CY HISPOTH_CY HISPPI_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPOTH_CY NHSPPI_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OLDRGENSCY OTHFBASECY OTHMBASECY OTHRACE_CY OWNER_CY PACIFIC_CY PAGEBASECY PCI_CY PIFBASE_CY PIMBASE_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SMCOLL_CY SOMEHS_CY TADULT01 TADULT02 TADULT03 TADULT04 TADULT05 TADULT06 TADULT07 TADULT08 TADULT09 TADULT11 TADULT12 TADULT13 TADULT14 TADULT15 TADULT16 TADULT17 TADULT18 TADULT19 TADULT20 TADULT21 TADULT22 TADULT23 TADULT24 TADULT25 TADULT26 TADULT27 TADULT28 TADULT29 TADULT30 TADULT31 TADULT32 TADULT33 TADULT34 TADULT35 TADULT36 TADULT37 TADULT38 TADULT39 TADULT40 TADULT41 TADULT42 TADULT43 TADULT44 TADULT45 TADULT46 TADULT47 TADULT48 TADULT49 TADULT50 TADULT51 TADULT52 TADULT53 TADULT54 TADULT55 TADULT56 TADULT57 TADULT58 TADULT59 TADULT60 TADULT61 TADULT62 TADULT63 TADULT64 TADULT65 TADULT66 TADULT67 TADULT68 TADULTBASE THH01 THH02 THH03 THH04 THH05 THH06 THH07 THH08 THH09 THH11 THH12 THH13 THH14 THH15 THH16 THH17 THH18 THH19 THH20 THH21 THH22 THH23 THH24 THH25 THH26 THH27 THH28 THH29 THH30 THH31 THH32 THH33 THH34 THH35 THH36 THH37 THH38 THH39 THH40 THH41 THH42 THH43 THH44 THH45 THH46 THH47 THH48 THH49 THH50 THH51 THH52 THH53 THH54 THH55 THH56 THH57 THH58 THH59 THH60 THH61 THH62 THH63 THH64 THH65 THH66 THH67 THH68 THHBASE THHGRPL1 THHGRPL11 THHGRPL12 THHGRPL13 THHGRPL14 THHGRPL2 THHGRPL3 THHGRPL4 THHGRPL5 THHGRPL6 THHGRPL7 THHGRPL8 THHGRPL9 THHGRPU1 THHGRPU2 THHGRPU3 THHGRPU4 THHGRPU5 THHGRPU6 TOTHH_CY TOTHU_CY TOTPOP_CY TSEGNUM UNEMPRT_CY UNEMP_CY VACANT_CY VAL0_CY VAL150K_CY VAL1M_CY VAL1PT5MCY VAL250K_CY VAL2M_CY VAL50K_CY VAL750K_CY VALBASE_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
0 0.067079 0.058098 0.067967 0.067621 0.067624 0.067112 0.036234 0.037716 0.036973 0.010595 0.058098 0.057994 0.058208 0.067235 0.014692 0.027737 0.025862 0.014430 0.009782 0.017051 0.067878 0.067814 0.053549 0.053549 0.052824 0.054324 0.068043 0.068133 0.068035 0.068029 0.068037 0.067392 0.067874 0.068112 0.067946 0.068110 0.067880 0.067885 0.067926 0.067998 0.068053 0.068018 0.067958 0.067525 0.067857 0.067614 0.067222 0.066847 0.066401 0.065686 0.068118 0.063479 0.067358 0.068125 0.068075 0.067689 0.066467 0.066317 0.062484 0.068126 0.066208 0.066029 0.066431 0.066181 0.066665 0.067362 0.067875 0.067948 0.059589 0.055683 0.051291 0.062407 0.059857 0.052641 0.062484 0.060889 0.066250 0.062488 0.062474 0.036973 0.010548 0.068157 0.068160 0.067402 0.067866 0.067924 0.067860 0.067865 0.067921 0.068015 0.068094 0.068070 0.067994 0.067524 0.067902 0.067688 0.067248 0.066776 0.066235 0.065636 0.068121 0.068141 0.068104 -0.008828 0.009330 -0.007062 -0.006297 0.006627 -0.011373 -0.003487 0.012110 0.067917 0.065704 0.064007 0.063799 0.067857 0.017708 0.058119 0.052785 0.063430 0.056606 0.032225 0.064021 0.064803 0.066425 0.060082 0.066610 0.059936 0.060213 0.060082 0.067147 0.034347 0.034347 0.004348 0.034759 0.033930 0.067397 0.067872 0.068141 0.067940 0.068141 0.067874 0.067880 0.067930 0.068012 0.068078 0.068048 0.067980 0.067525 0.067885 0.067654 0.067242 0.066832 0.066369 0.065761 -0.005488 0.063908 0.068125 0.067652 0.067676 0.067310 0.055469 0.058244 0.055469 0.055196 0.061669 0.054852 0.045551 0.044954 0.050047 0.059840 0.049609 0.058228 0.058247 0.032323 0.048176 0.058037 0.027361 0.036779 0.043737 0.037506 0.020139 0.050777 0.001219 0.036922 0.023664 0.046224 0.050045 0.056971 0.043543 0.046956 0.042867 0.046537 0.053831 0.052349 0.029883 0.048035 0.057004 0.034282 0.034117 0.055958 0.030280 0.038379 0.051657 0.060586 0.026127 0.022421 0.010628 0.045219 0.008275 0.022589 0.048960 0.056922 0.052426 0.036720 0.040956 0.024883 0.035746 0.026889 0.049271 0.047622 0.056287 0.048052 0.021827 0.049742 0.058882 0.061360 0.060507 0.068141 0.056054 0.057746 0.054611 0.054877 0.062198 0.055330 0.045132 0.045441 0.050367 0.059038 0.049893 0.057119 0.057731 0.031374 0.047457 0.057408 0.026786 0.035501 0.043122 0.036897 0.019834 0.050372 0.000097 0.036246 0.022835 0.044746 0.050393 0.056702 0.042578 0.047109 0.042227 0.046101 0.054112 0.051746 0.029738 0.047725 0.056214 0.033174 0.034145 0.056224 0.030600 0.037866 0.051180 0.059060 0.025046 0.021073 0.009522 0.044457 0.006334 0.022736 0.047624 0.056655 0.051269 0.036442 0.039861 0.024217 0.034967 0.026457 0.049263 0.047824 0.054559 0.047645 0.022017 0.046895 0.058053 0.057093 0.054201 0.067948 0.064084 0.060069 0.034802 0.056153 0.060691 0.052587 0.056097 0.053469 0.048462 0.036268 0.057089 0.064164 0.047533 0.050115 0.065278 0.058679 0.066223 0.050364 0.037789 0.067948 0.067751 0.068125 -0.002565 0.013824 0.067448 0.060060 0.048786 0.050060 0.053909 0.052876 0.061415 0.053834 0.043232 0.054522 0.067146 0.067075 0.067075 0.066984 0.067158 0.067143
1 -0.003570 0.078358 0.007632 0.013815 0.013850 0.007650 0.032811 0.033594 0.033203 0.011870 0.078358 0.078733 0.077934 -0.011698 0.086543 0.058789 0.047331 0.087002 0.062984 0.107941 -0.009610 0.009897 -0.059093 -0.059093 -0.059540 -0.058562 -0.000099 -0.002924 0.000294 -0.009092 -0.000135 0.001447 0.000411 -0.003220 0.001643 -0.003320 0.006778 0.006489 0.002683 -0.000206 -0.001863 -0.003488 -0.006710 -0.000264 -0.009542 -0.013022 -0.014909 -0.015643 -0.015773 -0.011326 -0.002369 -0.050427 0.001937 -0.001592 -0.000534 0.000631 -0.010569 0.016594 0.038929 -0.001388 -0.031004 0.031528 -0.034124 -0.037422 -0.033052 -0.024669 -0.010650 -0.011740 0.061031 0.081668 0.002465 0.058781 0.063432 0.075984 0.038929 0.017741 -0.028801 0.038922 0.038932 0.033203 0.012102 -0.001403 -0.001544 0.001788 0.001720 0.003512 0.007357 0.007864 0.004619 0.001246 -0.000635 -0.002192 -0.005564 0.000285 -0.008973 -0.013372 -0.015794 -0.015676 -0.013866 -0.005600 -0.000795 -0.002121 -0.003418 -0.023117 0.091761 -0.026162 -0.017788 0.090619 -0.019082 0.044550 0.108742 0.005450 0.028642 0.048676 0.049491 0.008129 0.012079 0.078280 -0.061888 0.039897 0.034381 0.086034 -0.040299 0.035399 -0.023884 0.063222 -0.013902 0.064405 0.062076 0.063222 -0.026175 0.085895 0.085895 0.068772 0.086375 0.085400 0.001621 0.001083 -0.002333 0.002598 -0.002455 0.007075 0.007187 0.003660 0.000516 -0.001254 -0.002849 -0.006155 0.000016 -0.009272 -0.013187 -0.015317 -0.015662 -0.014967 -0.009227 0.025373 0.049081 -0.001592 0.008534 -0.004011 -0.006131 0.071942 -0.010463 0.010224 0.016941 0.055896 0.088235 0.084986 0.102180 0.070966 0.010944 0.092762 -0.036219 -0.015724 -0.099459 -0.083461 -0.050462 0.019262 -0.100383 -0.097887 -0.096308 -0.099094 0.041416 -0.019879 -0.056383 -0.104982 -0.027970 0.087403 -0.001613 -0.012517 0.088596 -0.031808 0.094322 -0.036517 -0.043726 0.039763 0.044789 -0.064166 -0.103474 -0.033358 0.027259 -0.025306 -0.019744 -0.044603 0.012888 -0.094829 -0.094625 -0.041227 -0.053335 -0.067892 0.022370 -0.050605 -0.013456 -0.051233 -0.103788 -0.077216 -0.099452 -0.111264 -0.117810 0.093961 0.089553 0.023501 0.070591 0.018706 0.039119 -0.056989 -0.037168 0.043876 -0.002333 0.070589 -0.013876 0.004464 0.012156 0.052247 0.086852 0.084383 0.101932 0.068955 0.008663 0.092922 -0.043486 -0.019348 -0.101269 -0.085413 -0.055806 0.016646 -0.100524 -0.099004 -0.097437 -0.099144 0.040599 -0.018370 -0.055940 -0.103951 -0.033310 0.086692 -0.005427 -0.015858 0.087950 -0.032558 0.093337 -0.041952 -0.048266 0.039260 0.041022 -0.067203 -0.102147 -0.033188 0.024481 -0.023861 -0.020854 -0.046268 0.009024 -0.094621 -0.094054 -0.040291 -0.056039 -0.065157 0.022911 -0.053729 -0.017638 -0.053793 -0.105655 -0.080008 -0.098469 -0.111256 -0.118202 0.093789 0.088934 0.014826 0.068402 0.018833 0.044587 -0.060631 -0.054828 0.014479 -0.011740 0.030154 -0.041832 -0.118923 0.080793 -0.047940 0.093005 0.067507 -0.062549 -0.080377 -0.093682 0.011350 0.010511 -0.019762 0.054064 0.030386 -0.071277 0.012321 -0.094254 -0.115470 -0.011740 -0.016480 -0.001592 -0.055622 -0.026290 -0.007574 -0.055116 -0.101505 -0.105472 0.088038 0.090609 -0.044032 0.086213 -0.116322 0.088957 -0.026186 -0.023713 -0.023713 -0.024738 -0.022661 -0.019307
2 0.032090 0.003081 0.008313 0.016172 0.016107 0.028764 -0.077737 -0.077960 -0.077859 -0.091612 0.003081 0.002646 0.003561 0.016275 0.040054 -0.049858 -0.061223 0.064525 0.086860 0.037786 0.015549 0.011148 0.010890 0.010890 0.013322 0.008180 0.006992 0.005943 0.006476 -0.000274 -0.005955 -0.023959 -0.004520 0.006753 -0.003744 0.007116 -0.008720 -0.006691 -0.006329 -0.003357 0.003477 0.011469 0.014992 -0.020271 0.016807 0.016619 0.019803 0.024402 0.033593 0.050590 0.001376 -0.003323 -0.024446 -0.000445 0.000996 -0.014853 0.033545 0.037858 -0.058942 -0.001215 0.009746 0.022930 0.001435 -0.003379 -0.003579 0.000194 0.010974 0.007980 -0.048277 -0.025747 0.078591 -0.027973 -0.042775 -0.031861 -0.058942 -0.075435 0.027691 -0.058087 -0.059783 -0.077859 -0.091921 0.002397 0.002713 -0.023791 -0.006228 -0.007188 -0.012136 -0.010003 -0.008991 -0.005708 0.001410 0.009458 0.013994 -0.020048 0.016063 0.014682 0.015421 0.018300 0.025710 0.037889 -0.002312 0.004034 -0.001162 0.101486 0.043127 0.103668 0.092603 0.057047 0.098614 0.072006 0.029761 -0.008161 -0.036387 -0.012029 -0.015629 0.011553 -0.076563 0.003546 0.006537 -0.001932 0.065062 -0.043034 0.045816 -0.034429 0.031930 -0.041085 0.029334 -0.039348 -0.042746 -0.041085 0.006572 -0.042411 -0.042411 0.081799 -0.041946 -0.042868 -0.023873 -0.005398 0.004626 -0.005503 0.004972 -0.010467 -0.008372 -0.007672 -0.004527 0.002451 0.010478 0.014510 -0.020158 0.016455 0.015716 0.017793 0.021683 0.030243 0.045972 0.020974 -0.013808 -0.000445 0.009770 -0.018910 -0.016641 0.055604 -0.019444 -0.111625 0.082507 -0.001303 0.013034 0.097352 0.010728 -0.011326 -0.015736 0.051085 -0.063356 -0.080846 -0.081298 0.081995 0.028746 0.118725 0.066486 0.077051 0.063482 0.105451 -0.000352 -0.028090 0.007668 0.091566 -0.140576 -0.019441 -0.088123 -0.128073 -0.026115 -0.119573 0.076317 -0.010949 -0.096141 0.111727 0.032838 -0.001280 0.062667 -0.026991 0.105633 -0.010747 -0.036067 0.068089 0.090062 -0.079574 -0.039653 -0.090367 -0.112380 -0.064592 0.136751 -0.123052 -0.087573 0.037244 0.059572 0.022237 0.079540 0.025796 0.024162 0.050945 -0.016170 -0.103065 0.051743 0.118450 -0.086586 -0.006524 0.021003 -0.011673 0.004626 0.053026 -0.019005 -0.113898 0.082707 -0.003554 0.011146 0.099461 0.013610 -0.011029 -0.019594 0.048780 -0.061826 -0.081416 -0.079944 0.081974 0.025344 0.120533 0.071711 0.079021 0.064313 0.105245 0.000466 -0.027910 0.008417 0.092725 -0.141759 -0.020136 -0.090154 -0.128668 -0.026564 -0.120108 0.079377 -0.013081 -0.095964 0.112286 0.035718 0.001598 0.068500 -0.026416 0.104955 -0.011142 -0.034554 0.066114 0.099710 -0.076920 -0.038922 -0.086326 -0.108512 -0.064144 0.137573 -0.123816 -0.089430 0.038849 0.061339 0.027616 0.083932 0.033106 0.028594 0.049931 -0.016009 -0.109768 0.055062 0.118193 -0.090465 -0.022624 -0.028570 0.045168 0.007981 -0.001695 -0.000489 0.057746 0.030119 -0.036581 0.044748 0.048158 -0.082089 0.093889 0.080423 -0.111393 0.055943 0.021591 0.078770 -0.031582 0.024465 0.007623 -0.022470 -0.006959 0.007981 0.008596 -0.000445 -0.098971 0.011121 0.016734 0.013036 -0.041565 -0.001591 0.008349 0.010803 0.003977 0.023723 -0.012311 0.013686 0.006555 0.008716 0.008716 0.010216 0.007182 0.018853
3 -0.006155 -0.047969 -0.000254 -0.004334 -0.004376 0.027317 -0.042152 -0.041447 -0.041809 -0.019525 -0.047969 -0.047092 -0.048935 0.010362 0.146194 -0.010287 -0.004217 0.134147 0.189814 0.093224 0.002748 0.002926 0.002363 0.002363 0.000660 0.004253 -0.008931 -0.004438 -0.008959 -0.005501 -0.012409 -0.022309 -0.019915 -0.006062 -0.019494 -0.005253 -0.018465 -0.018718 -0.016942 -0.013434 -0.009514 -0.006287 -0.003280 -0.020423 0.001242 0.010229 0.017504 0.021941 0.023101 0.022084 -0.009265 -0.004943 -0.022865 -0.009664 -0.011066 -0.020331 -0.022888 0.001111 -0.003358 -0.009359 -0.020401 -0.007694 -0.006811 0.001988 0.007043 0.004048 0.000094 -0.003046 -0.039888 -0.037061 0.031089 -0.020490 -0.044730 -0.024271 -0.003358 0.027415 0.000950 -0.002142 -0.004562 -0.041809 -0.020049 -0.006743 -0.005900 -0.022266 -0.019927 -0.019534 -0.017150 -0.017661 -0.016810 -0.013914 -0.009778 -0.007283 -0.005016 -0.020905 -0.001785 0.009560 0.021204 0.029632 0.035902 0.039008 -0.010072 -0.007005 -0.006305 0.075748 0.139980 0.070865 0.042360 0.141307 0.078435 0.155997 0.096154 -0.018306 -0.012687 -0.021383 -0.021127 -0.016204 -0.034011 -0.048131 0.000554 -0.021317 0.019147 -0.013559 -0.004754 -0.031757 -0.012467 -0.043820 0.026258 -0.043958 -0.043681 -0.043820 0.007471 -0.014642 -0.014642 0.137306 -0.015367 -0.013916 -0.022287 -0.019922 -0.006395 -0.019516 -0.005569 -0.017794 -0.018183 -0.016877 -0.013674 -0.009646 -0.006778 -0.004121 -0.020668 -0.000197 0.009917 0.019206 0.025381 0.028586 0.028365 0.041546 -0.021258 -0.009664 -0.017578 -0.006601 -0.025659 -0.011353 0.033891 0.002805 0.054170 -0.000644 -0.016796 -0.029490 -0.073561 0.011651 0.010343 -0.070535 0.036005 0.087234 0.008373 0.003913 0.025553 0.116382 -0.020935 0.020989 -0.019909 -0.089950 0.061997 -0.039389 0.016964 -0.086284 0.029623 -0.050788 0.089029 -0.010764 -0.032386 0.047983 -0.032208 0.080246 0.089166 -0.094979 0.090853 0.049068 -0.082718 0.195664 0.058907 0.199108 0.173721 0.117937 -0.001166 -0.065312 -0.094514 -0.080855 0.035077 -0.069519 -0.056121 0.045844 0.104736 0.052091 0.004193 0.024630 -0.074103 -0.070036 -0.028931 -0.047287 -0.060408 -0.005888 0.009961 -0.080290 -0.022494 -0.052943 -0.023672 -0.034677 -0.006395 -0.011440 0.032828 0.004564 0.055371 0.002478 -0.017497 -0.026184 -0.075106 0.012620 0.011499 -0.069699 0.032877 0.087607 0.001183 0.002847 0.024097 0.115283 -0.025958 0.018690 -0.022541 -0.090125 0.063077 -0.037893 0.017510 -0.086672 0.029628 -0.049803 0.090620 -0.010091 -0.029382 0.045939 -0.030108 0.078099 0.085495 -0.094622 0.093196 0.049138 -0.086343 0.195697 0.060200 0.199201 0.175298 0.120710 0.001720 -0.069856 -0.098154 -0.082756 0.031807 -0.077156 -0.055377 0.042269 0.104069 0.052880 -0.006087 0.008904 -0.076142 -0.071180 -0.037057 -0.043436 -0.059180 -0.002454 0.013795 -0.079867 -0.028309 -0.050283 -0.002161 -0.070956 -0.003046 0.017808 0.031465 -0.059071 -0.054671 -0.032490 -0.029284 -0.055731 0.042425 0.029325 -0.057323 0.016255 -0.001403 0.164185 -0.065879 -0.009064 0.022195 0.050779 0.009263 -0.089657 -0.003046 0.003692 -0.009664 -0.101031 -0.014716 -0.008299 0.060365 -0.029720 0.029495 -0.044447 -0.048578 0.091377 -0.047359 -0.043359 -0.034301 0.007493 0.005562 0.005562 0.006448 0.004655 0.005683
4 -0.008597 0.017211 -0.012733 -0.013576 -0.013243 -0.003663 0.046590 0.045204 0.045911 -0.055925 0.017211 0.018703 0.015560 0.022603 -0.168747 -0.078060 -0.054355 -0.162045 -0.113371 -0.056396 0.009111 -0.011294 0.007543 0.007543 0.007419 0.007676 -0.013265 0.001715 -0.013815 -0.006325 -0.009482 -0.023116 -0.018770 0.000337 -0.012778 0.001248 -0.008391 -0.009869 -0.013597 -0.011485 -0.006375 -0.002556 0.001037 -0.023760 0.008764 0.019648 0.028539 0.033154 0.033254 0.026726 -0.004739 0.002702 -0.023419 -0.005365 -0.008002 -0.021778 -0.013627 -0.011731 -0.004825 -0.005175 0.022096 -0.027388 0.019121 0.012316 0.009339 -0.002924 -0.010882 -0.003012 0.003575 0.041749 0.037616 0.014402 0.003342 0.040255 -0.004825 -0.014453 0.004269 -0.004008 -0.005633 0.045911 -0.056254 -0.000877 -0.000008 -0.022975 -0.018050 -0.012096 -0.007847 -0.008972 -0.012439 -0.011073 -0.006481 -0.003508 -0.001830 -0.023909 0.004274 0.016670 0.028889 0.037673 0.042740 0.044746 -0.006007 -0.001138 -0.007947 0.114445 -0.176215 0.117680 0.142872 -0.173584 0.109373 -0.152659 -0.060321 -0.010405 0.003267 0.017081 0.015596 -0.001121 0.057809 0.016809 0.005564 0.017496 0.022014 0.023370 -0.015896 0.007299 -0.005285 0.003686 0.034618 0.004747 0.002666 0.003686 -0.010207 0.025096 0.025096 -0.144260 0.025219 0.024968 -0.023044 -0.018401 -0.000256 -0.012430 0.000636 -0.008113 -0.009415 -0.013014 -0.011280 -0.006428 -0.003025 -0.000352 -0.023836 0.006630 0.018259 0.028703 0.035180 0.037328 0.033419 -0.049979 0.016349 -0.005365 0.007035 0.002727 0.019080 -0.019530 -0.118887 -0.080711 -0.096373 0.031761 0.027145 0.010050 0.061061 -0.040542 -0.100661 0.042381 -0.063219 -0.033547 0.029744 -0.040704 -0.019747 -0.109123 -0.022691 0.039244 -0.109578 -0.058600 0.089820 -0.116917 -0.014023 -0.065867 -0.064111 0.062411 0.050934 -0.114977 0.082107 -0.079075 0.017148 0.020737 -0.035608 0.034151 -0.008905 0.047490 -0.026527 0.160520 0.024531 0.168166 0.166375 0.071135 0.009042 0.047640 0.042366 -0.018921 0.064635 0.116193 0.002635 -0.060148 0.027425 0.055610 0.019440 0.011440 -0.047201 0.040203 0.027668 0.038156 0.049925 -0.058586 0.018342 0.019774 -0.021324 -0.044134 -0.065348 -0.003765 -0.000256 -0.021373 -0.123220 -0.087982 -0.101902 0.031021 0.026945 0.005890 0.060968 -0.044113 -0.104463 0.042848 -0.068494 -0.038668 0.027978 -0.041280 -0.020361 -0.109541 -0.025014 0.038582 -0.109541 -0.058810 0.089594 -0.113137 -0.013018 -0.066762 -0.067651 0.060233 0.046920 -0.118387 0.082582 -0.083217 0.015438 0.017834 -0.041346 0.033575 -0.012720 0.045688 -0.025029 0.160649 0.024782 0.167494 0.167288 0.072863 0.006039 0.048792 0.040811 -0.013280 0.069398 0.112606 0.000003 -0.067300 0.020960 0.053715 0.013426 0.002533 -0.046207 0.040680 0.024884 0.036265 0.048336 -0.070784 0.014260 0.019689 -0.020158 -0.036796 -0.068038 -0.004876 -0.003012 -0.066280 -0.010118 -0.001907 0.023294 -0.049398 0.012805 -0.008549 -0.028384 -0.036217 -0.071715 -0.025471 0.010444 0.133500 -0.001523 0.008921 -0.011950 -0.024663 0.068124 -0.001672 -0.003012 0.004411 -0.005365 0.181867 0.045235 -0.002658 0.066810 -0.008848 -0.036772 0.053907 0.057481 -0.027950 0.065311 -0.043220 0.043804 -0.010207 -0.016435 -0.016435 -0.016171 -0.016702 0.023654
In [308]:
# Top 10 loading scores of PC1
loading_scores = pd.Series(data=pca_statetest.components_[0], index = test_newstate_df.columns)
sorted_loading_scores = loading_scores.abs().sort_values(ascending=False)
top_10 = sorted_loading_scores[0:10].index.values
print(loading_scores[top_10])
MAL21UP_CY    0.068160
MAL18UP_CY    0.068157
MARBASE_CY    0.068141
POP21UP_CY    0.068141
TADULTBASE    0.068141
POP18UP_CY    0.068141
EDUCBASECY    0.068133
HHPOP_CY      0.068126
RACEBASECY    0.068125
GENBASE_CY    0.068125
dtype: float64

These loading score values are very similar which means a lot of the variables played a role in creating the principal component. The loading score details can be seen in dataframe of components above. The composition also tells us that our component is not depend on a few variables but many variables were used.

Correlation Plot of first 5 PC

In [305]:
sns.set(rc={'figure.figsize':(32,8.27)})
sns.heatmap(pca_statetest.components_[0:4], xticklabels=test_newstate_df.columns, annot=True)
Out[305]:
<matplotlib.axes._subplots.AxesSubplot at 0x1f4bbe41320>

the value 0.144 for Feature Provider Count is the score of this feature on the PC1. This value tells us 'how much' the feature influences the PC (in our case the PC1).

So the higher the value, the higher the influence on the principal component.

In [ ]:
 

PCA Using Yeo Johnson

In [32]:
from sklearn.preprocessing import PowerTransformer
pt_state = PowerTransformer(method='yeo-johnson')
newstate_df_pt = pt_state.fit_transform(test_newstate_df)
C:\Users\mohi9282\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\sklearn\preprocessing\data.py:2863: RuntimeWarning: divide by zero encountered in log
  loglike = -n_samples / 2 * np.log(x_trans.var())
In [36]:
# Import and fit PCA
from sklearn.decomposition import PCA
# pca_statetest = PCA().fit(newstate_df_std)
# pca_newstate = pca_statetest.transform(newstate_df_std)
pca_statetest = PCA(n_components=8)
pca_newstate = pca_statetest.fit_transform(newstate_df_pt)
In [37]:
pca_statetest.components_
Out[37]:
array([[ 8.56827471e-02,  2.46501764e-17,  1.70612740e-17, ...,
         8.56642910e-02,  8.58807499e-02,  8.59396494e-02],
       [ 2.04009326e-02, -4.51530494e-17,  4.92165744e-17, ...,
        -1.89815983e-02, -1.92861618e-02, -1.18518428e-02],
       [-3.69484764e-02,  1.68812862e-17, -8.88588834e-17, ...,
        -2.92403533e-02, -2.52796280e-02, -4.20536595e-02],
       ...,
       [ 9.81709512e-03, -1.48631479e-16,  6.07594257e-17, ...,
         6.00700145e-03,  4.28828440e-03,  9.54607887e-03],
       [ 1.18446865e-02,  1.38316898e-17,  9.84220915e-20, ...,
        -2.12025122e-02, -1.56032701e-02,  1.48317374e-02],
       [ 6.02476248e-04, -1.75361435e-16, -6.85856629e-17, ...,
        -1.57583965e-02, -1.39048380e-02,  2.27678656e-02]])
In [38]:
pca_statetest.explained_variance_ratio_
Out[38]:
array([0.57343958, 0.12373149, 0.07294693, 0.04454296, 0.02618836,
       0.01954974, 0.01720015, 0.01370818])
In [41]:
sum(pca_statetest.explained_variance_ratio_[:5])
Out[41]:
0.8408493275144913

Scree Plot showing variation explained by each PC

In [39]:
# Show percentage of variance explained by different principal components
sns.set(rc={'figure.figsize':(7,7)})
labels = ['PC' + str(x) for x in range(1,9)]
plt.plot(np.cumsum(pca_statetest.explained_variance_ratio_))
plt.bar(x=range(0,8), height=pca_statetest.explained_variance_ratio_, tick_label = labels)
plt.xlabel('Number of components')
# plt.yticks(range(0,1,0.1))
# plt.ylim(bottom=0.90)
plt.ylabel('Cumulative explained variance');

The variance explained by PC1 is ~57% and the cumulative variance explained by first 5 components is ~84%.

Plot first 2 PCs

In [42]:
# Create df for PCs with State Labels
pca_df = pd.DataFrame(data=pca_newstate, index=newstate_obgyn_df.RegionAbbr, columns = ['PC1','PC2','PC3','PC4','PC5','PC6','PC7','PC8'])
pca_df
Out[42]:
PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8
RegionAbbr
CA 24.941061 6.474051 5.609687 -0.962691 -0.704153 0.894702 0.912505 -0.478776
TX 23.908717 -2.544515 5.188710 0.814537 1.263244 -0.390794 0.796420 -1.510516
NY 16.397040 4.697254 -4.149995 -0.055749 0.600847 5.558235 3.165286 -0.460776
FL 21.575314 -0.545527 -1.160204 -1.382744 -4.993933 0.063733 -2.346939 0.841382
PA 14.254328 -0.192569 -7.431125 -2.612835 0.542363 2.054582 2.224964 -1.109572
IL 13.903033 1.648756 -2.133280 1.190061 3.743880 0.313898 1.203285 -0.065390
MI 10.537042 -4.242443 -4.319592 -1.417743 0.299792 3.046424 -0.083627 0.379641
OH 11.340141 -5.463046 -5.949948 -0.040940 2.577762 0.054191 0.904389 0.531492
NJ 6.359957 11.923885 -1.803437 2.064464 0.032182 0.124552 -0.960482 -0.039266
GA 10.837933 -2.252931 1.608639 4.604972 -0.408737 -2.809584 -1.003404 -1.468180
NC 11.626048 -4.611761 0.913803 1.403094 -2.432750 -0.588660 0.045871 -1.422783
VA 9.744681 2.424011 -0.872190 1.231040 0.159863 -3.181201 3.037987 -1.743821
MA 4.507952 11.264660 -4.467088 -1.673932 0.368888 1.671717 0.221221 -1.042171
MD 4.452790 7.260558 -1.979991 2.836840 1.174696 -3.648621 -0.409089 -1.969792
MO 4.902518 -4.333476 -2.138973 -0.195669 0.461320 -1.158055 1.765426 -0.031696
WA 9.147755 4.068888 3.896582 -4.377601 -1.041934 -1.104182 2.407585 -0.373697
AZ 8.454773 1.349003 6.549264 0.354253 -2.795823 2.677352 -3.556716 1.030261
IN 3.858799 -6.668229 -2.547097 0.339778 2.779614 -0.741004 -1.179909 2.625238
TN 5.239647 -5.048140 -1.881375 2.747517 -1.342516 -2.050955 -0.197252 0.895178
CO 5.947022 3.222646 4.968447 -2.856916 1.318518 -0.989827 -1.125881 -0.443467
SC 1.718689 -4.691551 -0.619011 3.274218 -3.414196 -2.499577 -0.623431 0.431597
CT -2.294625 10.431394 -4.872230 0.092104 0.589346 -0.159243 -3.347191 -1.503408
LA 1.056402 -3.511091 -0.672560 4.889602 -0.827736 -0.069310 -0.055843 -2.734135
MN 4.113591 -0.888401 -0.001173 -5.122606 3.598770 -1.222785 -1.959676 -1.393251
WI 3.767021 -3.213935 -3.497921 -4.185546 3.481066 -0.207978 -1.939934 0.580935
KY -0.522537 -6.035116 -2.311867 1.603457 -0.983441 -1.515464 0.491492 0.730095
AL 0.925128 -5.318121 -1.607998 4.253343 -1.751460 -1.038961 0.146819 -0.091159
OR 2.338167 2.398451 2.504058 -6.288424 -2.015892 -0.349357 -1.258296 1.892730
OK 0.294842 -6.532883 3.154125 1.527624 0.665162 2.570006 0.153812 0.534761
MS -5.866029 -5.675623 -0.737126 6.285331 -1.565272 -0.573433 0.422939 -1.234640
NV -0.838720 3.135504 6.268458 1.763869 -1.500820 0.511188 -2.649213 3.706389
UT -2.881539 2.169321 8.881553 -0.298284 2.595103 -3.469909 0.240853 1.380089
KS -2.902079 -3.822638 1.551843 0.804892 4.384112 1.185009 -0.163252 1.509428
IA -4.339032 -4.497665 -1.166603 -2.728882 4.526969 -0.478473 -0.095412 3.695027
AR -2.980338 -5.599416 1.106490 3.101318 -2.470753 -0.025113 0.099192 2.347363
NM -4.288426 -0.981584 6.037603 -0.322682 -3.979422 5.608560 -2.521629 -0.211333
HI -10.161014 10.925445 2.845990 0.886577 -1.758315 -1.406064 7.962511 5.360556
NE -7.821808 -2.790074 1.732173 0.295374 5.522137 0.515462 -1.494783 1.140025
WV -12.870474 -5.544047 -6.308938 -0.439109 -4.314826 0.774787 1.414517 0.949638
DC -20.917248 9.532703 -3.460152 10.923909 2.896917 3.413946 -0.107010 0.506364
RI -12.154689 9.182793 -3.332281 -0.125686 -0.243982 1.736370 -3.376211 1.001130
NH -12.059679 3.929578 -3.747129 -5.235653 -1.495788 -3.763940 -1.271458 -0.821153
ID -8.787058 -2.575458 4.857307 -2.429535 0.472843 0.120727 0.485380 1.504048
DE -11.754908 4.623053 -2.260126 1.744238 -1.619071 -3.778306 -3.127486 0.162652
ME -12.797534 -0.946150 -4.928566 -5.514554 -4.260834 -0.207112 0.788516 -0.327974
MT -13.697272 -4.371800 1.044493 -2.815766 -2.016772 3.464333 1.947298 -1.906533
AK -15.516930 1.766643 10.256209 -0.055205 0.214877 -0.055887 2.102388 -4.804770
VT -19.784226 -0.583679 -5.201189 -3.978771 -1.249397 -1.050658 0.374199 -0.682257
SD -15.690296 -4.442951 1.937501 -1.077048 1.393601 1.940808 0.448964 -1.634963
WY -18.359159 -0.995520 2.587292 -1.794674 0.298392 -0.320102 1.084521 -1.805239
ND -16.864769 -3.508255 2.058941 -1.043167 3.225556 0.553975 0.005788 -2.425301
In [44]:
plt.figure(figsize=(20,10))
per_var = np.round(pca_statetest.explained_variance_ratio_*100, decimals=1)
plt.scatter(pca_df.PC1, pca_df.PC2)
plt.xlabel('PC1 - {0}%'.format(per_var[0]))
plt.ylabel('PC2 - {0}%'.format(per_var[1]))
for sample in pca_df.index:
    plt.annotate(sample, (pca_df.PC1.loc[sample],pca_df.PC2.loc[sample]))

This graph of first 2 components suggest that the cluster of states on the left (DC, UT, AK, CT) are correlated with each other. Similarly states in the bottom center (GA, NC, MI etc) are correlated with each other. The separation of 2 clusters along x-axis suggests that states towards the left are very different from states towards the right.

Check loadings of PCs

In [45]:
componentdf = pd.DataFrame(data=pca_statetest.components_, columns = test_newstate_df.columns)
componentdf.head()
Out[45]:
Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GQPOP_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPAI_CY HISPASN_CY HISPBLK_CY HISPMLT_CY HISPOTH_CY HISPPI_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPOTH_CY NHSPPI_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OLDRGENSCY OTHFBASECY OTHMBASECY OTHRACE_CY OWNER_CY PACIFIC_CY PAGEBASECY PCI_CY PIFBASE_CY PIMBASE_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SMCOLL_CY SOMEHS_CY TADULT01 TADULT02 TADULT03 TADULT04 TADULT05 TADULT06 TADULT07 TADULT08 TADULT09 TADULT11 TADULT12 TADULT13 TADULT14 TADULT15 TADULT16 TADULT17 TADULT18 TADULT19 TADULT20 TADULT21 TADULT22 TADULT23 TADULT24 TADULT25 TADULT26 TADULT27 TADULT28 TADULT29 TADULT30 TADULT31 TADULT32 TADULT33 TADULT34 TADULT35 TADULT36 TADULT37 TADULT38 TADULT39 TADULT40 TADULT41 TADULT42 TADULT43 TADULT44 TADULT45 TADULT46 TADULT47 TADULT48 TADULT49 TADULT50 TADULT51 TADULT52 TADULT53 TADULT54 TADULT55 TADULT56 TADULT57 TADULT58 TADULT59 TADULT60 TADULT61 TADULT62 TADULT63 TADULT64 TADULT65 TADULT66 TADULT67 TADULT68 TADULTBASE THH01 THH02 THH03 THH04 THH05 THH06 THH07 THH08 THH09 THH11 THH12 THH13 THH14 THH15 THH16 THH17 THH18 THH19 THH20 THH21 THH22 THH23 THH24 THH25 THH26 THH27 THH28 THH29 THH30 THH31 THH32 THH33 THH34 THH35 THH36 THH37 THH38 THH39 THH40 THH41 THH42 THH43 THH44 THH45 THH46 THH47 THH48 THH49 THH50 THH51 THH52 THH53 THH54 THH55 THH56 THH57 THH58 THH59 THH60 THH61 THH62 THH63 THH64 THH65 THH66 THH67 THH68 THHBASE THHGRPL1 THHGRPL11 THHGRPL12 THHGRPL13 THHGRPL14 THHGRPL2 THHGRPL3 THHGRPL4 THHGRPL5 THHGRPL6 THHGRPL7 THHGRPL8 THHGRPL9 THHGRPU1 THHGRPU2 THHGRPU3 THHGRPU4 THHGRPU5 THHGRPU6 TOTHH_CY TOTHU_CY TOTPOP_CY TSEGNUM UNEMPRT_CY UNEMP_CY VACANT_CY VAL0_CY VAL150K_CY VAL1M_CY VAL1PT5MCY VAL250K_CY VAL2M_CY VAL50K_CY VAL750K_CY VALBASE_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
0 0.085683 2.465018e-17 1.706127e-17 1.206350e-17 -2.418636e-17 -5.895328e-18 0.052559 0.053578 0.053072 0.021408 5.023896e-18 -3.009757e-18 0.078875 0.086244 3.655364e-18 0.039666 0.039064 -3.754861e-18 6.154518e-18 -2.263590e-18 3.418718e-20 3.215796e-18 0.074896 0.074896 0.074241 0.075580 2.357317e-18 1.196090e-18 -7.261180e-18 6.962755e-18 -1.683286e-18 4.051243e-18 -4.713840e-18 1.615958e-18 9.115194e-19 1.294890e-18 -5.218822e-18 -5.617389e-18 3.388000e-18 -5.696340e-18 -2.240383e-18 -1.960504e-18 9.940268e-19 9.715866e-19 3.287971e-18 -1.923931e-18 1.941226e-19 0.086474 0.085888 0.084687 -0.0 0.084626 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 0.084138 -0.0 0.085197 0.085924 0.086732 -0.0 -0.0 -0.0 0.072163 0.076025 0.078033 0.078956 0.079231 0.073096 -0.0 -0.0 0.085892 -0.0 -0.0 0.053072 0.021303 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 0.086432 0.085421 -0.0 -0.0 -0.0 -0.011538 -0.0 -0.008828 -0.011955 -0.0 -0.015808 0.002422 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 0.043703 -0.0 0.074476 -0.0 0.080397 0.059972 0.084554 -0.0 0.086238 0.079535 0.086322 0.079111 0.079858 0.079535 0.087039 0.062084 0.062084 -0.0 0.062408 0.061736 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 0.086152 0.085001 0.031455 -0.0 -0.0 -0.0 -0.0 -0.0 0.073387 0.079703 0.069097 0.074758 0.080037 0.067452 0.047312 0.050130 0.070482 0.073022 0.040283 0.080947 0.078418 0.057543 0.079927 0.075710 0.055159 0.064269 0.073370 0.069975 0.056940 0.046094 0.014159 0.059571 0.047669 0.054627 0.059226 0.075081 0.066858 0.045659 0.056298 0.042672 0.074924 0.072042 0.051459 0.065963 0.076449 0.069033 0.066245 0.073411 0.069773 0.065770 0.076703 0.077049 0.049963 0.054998 0.031138 0.059298 0.053029 0.044205 0.072131 0.076982 0.071014 0.061065 0.063811 0.054572 0.063491 0.053655 0.052528 0.044027 0.072151 0.060901 0.050955 0.033574 0.075765 0.074839 0.062812 -0.0 0.073953 0.079825 0.069087 0.074957 0.080305 0.068421 0.047543 0.050100 0.070942 0.072983 0.040673 0.080895 0.078635 0.056886 0.079575 0.075715 0.055016 0.063674 0.072955 0.069331 0.056168 0.045753 0.013229 0.059014 0.046911 0.053891 0.059649 0.075547 0.066238 0.045997 0.056547 0.042827 0.075695 0.072284 0.051457 0.066301 0.076254 0.068873 0.066576 0.073935 0.069686 0.065778 0.076579 0.076035 0.049554 0.054197 0.030470 0.059348 0.051329 0.044494 0.071894 0.077392 0.070773 0.061195 0.063641 0.054345 0.062992 0.053647 0.052797 0.044400 0.072230 0.060857 0.050516 0.030823 0.073175 0.070365 0.060398 -0.0 -0.0 0.082254 0.064420 0.071520 0.075812 0.065361 0.070086 0.078674 0.078209 0.062453 0.072502 0.084328 0.078787 0.070914 -0.0 0.083569 0.084980 0.070164 0.063236 -0.0 -0.0 -0.0 -0.001014 0.023665 -0.0 -0.0 0.070085 0.079827 0.074140 0.068529 0.085044 0.068394 0.067000 0.072713 0.087039 0.085779 0.085779 0.085664 0.085881 0.085940
1 0.020401 -4.515305e-17 4.921657e-17 -5.089035e-17 1.364893e-17 -2.587692e-17 -0.034574 -0.034343 -0.034468 -0.082945 -2.002968e-17 8.590029e-18 0.065508 -0.014635 -1.808775e-19 0.071206 0.045470 2.557926e-18 -1.558028e-17 -1.449645e-17 -3.559930e-18 -2.388000e-18 -0.004013 -0.004013 -0.003847 -0.004269 -1.557907e-18 -4.505577e-18 3.060224e-18 -1.475331e-17 -7.810819e-18 -4.422439e-18 -2.418346e-18 -5.500972e-18 -9.763423e-18 -6.925259e-18 -1.613203e-18 -3.095488e-18 -3.172126e-18 -7.212717e-18 -2.898549e-18 -2.690478e-18 1.752402e-18 2.462416e-18 2.815774e-19 3.954307e-19 4.885119e-19 -0.006136 -0.005213 0.001470 0.0 -0.033630 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.026700 0.0 -0.032828 -0.031828 -0.027269 0.0 0.0 0.0 0.029376 0.068137 0.058924 0.058497 0.040152 0.053106 0.0 0.0 -0.013840 0.0 0.0 -0.034468 -0.082883 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.005139 0.003537 0.0 0.0 0.0 0.004787 0.0 0.004835 0.001448 0.0 0.005028 0.090090 0.0 0.0 0.0 0.0 0.0 0.0 -0.057929 0.0 -0.006618 0.0 0.056056 0.018270 -0.023252 0.0 -0.010651 0.041177 -0.004183 0.044295 0.038425 0.041177 -0.014953 0.027291 0.027291 0.0 0.028773 0.025898 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.005171 0.002221 0.096918 0.0 0.0 0.0 0.0 0.0 0.077742 0.019375 -0.020860 0.051739 0.040435 0.099562 0.134863 0.096832 0.056042 0.053330 0.134557 -0.019198 0.015402 -0.115544 -0.028065 -0.034211 0.087488 -0.099554 -0.071594 -0.053730 -0.097189 0.029909 -0.108946 -0.042895 -0.131720 -0.078684 0.092232 0.014548 -0.048333 0.030158 -0.000352 0.137934 -0.002385 -0.026550 0.062636 0.067654 -0.062313 -0.095890 0.041771 0.080823 0.037290 0.001283 0.012376 0.044967 -0.119622 -0.102339 -0.099934 -0.086832 -0.094661 0.089435 -0.037392 0.004218 -0.041333 -0.035743 -0.026033 -0.123738 -0.110088 -0.064709 0.130808 0.073489 0.036109 0.083327 0.087660 0.033120 -0.070204 -0.023338 0.052308 0.0 0.075668 0.017482 -0.023278 0.049717 0.037493 0.096809 0.134909 0.096946 0.055380 0.051508 0.134445 -0.023970 0.012813 -0.117875 -0.030395 -0.038521 0.085433 -0.100777 -0.073276 -0.056165 -0.098673 0.029621 -0.109891 -0.043018 -0.132243 -0.081836 0.091990 0.011743 -0.050315 0.029866 0.000030 0.138497 -0.005137 -0.029566 0.063132 0.064886 -0.063504 -0.095880 0.041540 0.078440 0.038162 0.002199 0.011252 0.047321 -0.120193 -0.103700 -0.100297 -0.088392 -0.097204 0.088955 -0.041181 0.002230 -0.043942 -0.036755 -0.027361 -0.124069 -0.111245 -0.065343 0.130624 0.073384 0.033686 0.083089 0.092768 0.034786 -0.078677 -0.047789 0.025388 0.0 0.0 -0.002094 -0.096182 0.090065 -0.062050 0.107495 0.077462 -0.050829 -0.025066 -0.087196 -0.028302 0.016160 0.046559 0.090392 0.0 -0.039740 0.039568 -0.107237 -0.114634 0.0 0.0 0.0 -0.123445 0.017914 0.0 0.0 -0.105495 -0.061881 0.079118 0.094034 0.005818 0.094706 -0.110719 0.091677 -0.014961 -0.019127 -0.019127 -0.018982 -0.019286 -0.011852
2 -0.036948 1.688129e-17 -8.885888e-17 -6.544145e-17 7.119450e-17 1.401133e-17 0.138857 0.138144 0.138520 0.169852 -2.357290e-17 -1.765870e-17 0.005683 -0.015150 1.381044e-18 0.147914 0.138066 -1.786496e-18 -7.245192e-18 3.711866e-18 4.888289e-18 1.631003e-18 -0.057173 -0.057173 -0.059538 -0.054682 -7.193773e-18 -4.058091e-18 -1.184503e-17 6.308261e-18 -1.468394e-17 7.385927e-18 -1.569572e-17 4.501841e-18 4.314889e-18 -1.053572e-18 9.609118e-19 -7.415317e-19 6.003387e-18 1.111243e-18 2.451795e-17 1.268278e-17 -5.597962e-18 2.461913e-18 -9.544324e-18 4.485265e-18 -2.678288e-19 -0.039549 -0.046468 -0.056877 0.0 -0.024692 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.038479 0.0 -0.032883 -0.028070 -0.021975 0.0 0.0 0.0 0.100647 0.057376 -0.030139 0.055825 0.053661 0.071092 0.0 0.0 -0.041263 0.0 0.0 0.138520 0.170232 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.037397 -0.044245 0.0 0.0 0.0 -0.181368 0.0 -0.184369 -0.153420 0.0 -0.175238 -0.024327 0.0 0.0 0.0 0.0 0.0 0.0 0.142495 0.0 -0.057626 0.0 -0.024296 0.128635 -0.042146 0.0 -0.035081 0.050818 -0.041496 0.050484 0.051163 0.050818 -0.027854 0.123618 0.123618 0.0 0.121862 0.125225 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.042634 -0.052407 -0.143522 0.0 0.0 0.0 0.0 0.0 -0.024503 0.003177 0.103819 -0.031631 -0.006955 0.001720 -0.027489 -0.017360 0.013017 -0.022303 0.003014 0.035865 0.061208 0.043367 -0.060645 -0.012981 -0.063873 -0.037757 -0.068868 -0.067396 -0.107239 0.026627 0.055607 0.006354 -0.075435 0.140275 0.046866 0.092063 0.089711 0.082724 0.111225 0.000296 0.012145 0.089855 -0.034275 -0.013408 0.007987 -0.025098 0.005127 -0.069318 -0.006447 0.032874 -0.061916 -0.054699 -0.002003 -0.037959 0.070259 0.082087 -0.023162 -0.091292 0.078742 0.058526 -0.004982 -0.087630 -0.078602 -0.026438 -0.058690 -0.088308 0.004454 0.067604 0.052954 -0.044996 -0.022442 0.112413 -0.018657 -0.060983 0.025741 0.0 -0.024553 0.001385 0.102382 -0.033776 -0.008540 0.002124 -0.028443 -0.017153 0.011107 -0.020837 0.002355 0.032978 0.059259 0.040632 -0.062508 -0.014503 -0.066097 -0.041458 -0.069693 -0.069705 -0.108260 0.026381 0.054180 0.005412 -0.076570 0.138952 0.046258 0.090687 0.090814 0.082591 0.111279 -0.001429 0.011623 0.086060 -0.034118 -0.016984 0.005907 -0.028557 0.004776 -0.068891 -0.006276 0.032151 -0.062059 -0.056985 -0.004664 -0.040064 0.068663 0.079716 -0.022534 -0.091949 0.076612 0.056585 -0.002580 -0.089692 -0.080588 -0.029529 -0.061226 -0.089821 0.003343 0.066910 0.055397 -0.045505 -0.018725 0.119030 -0.012483 -0.041485 -0.021118 0.0 0.0 0.000061 -0.082621 -0.007645 0.005437 -0.018426 -0.023834 0.045090 -0.069725 -0.064967 0.120359 -0.000135 -0.037833 -0.014705 0.0 -0.023279 -0.010126 0.005014 -0.052907 0.0 0.0 0.0 0.041781 0.009035 0.0 0.0 -0.021272 -0.040786 -0.018901 -0.006572 -0.017319 -0.019541 -0.049012 -0.001518 -0.027858 -0.027286 -0.027286 -0.029240 -0.025280 -0.042054
3 0.034192 -3.086556e-17 -1.398148e-17 -2.235588e-17 1.655388e-17 -1.331722e-16 -0.040741 -0.042075 -0.041402 -0.079849 4.623954e-17 -1.805611e-17 0.011894 -0.032501 2.771436e-17 0.060366 0.000587 -1.593049e-17 2.424793e-17 3.309880e-17 3.082814e-17 -2.268440e-17 0.138184 0.138184 0.140570 0.135368 1.546415e-18 -1.437585e-17 -2.140256e-18 1.256237e-17 -1.703816e-17 4.748225e-18 -9.666831e-18 -9.665212e-19 -1.956447e-17 -1.827287e-17 -5.064333e-18 -9.547341e-18 -9.287188e-18 -2.172381e-17 7.173587e-18 1.063483e-18 3.963385e-18 3.658758e-18 1.258421e-18 -1.892552e-18 -1.944177e-20 0.007884 0.004274 -0.007940 -0.0 0.019728 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 0.042990 -0.0 0.018131 0.011598 0.004224 -0.0 -0.0 -0.0 -0.014306 0.015581 0.071734 0.015658 0.037206 0.049469 -0.0 -0.0 0.010438 -0.0 -0.0 -0.041402 -0.079431 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.004309 -0.015553 -0.0 -0.0 -0.0 -0.126203 -0.0 -0.119779 -0.121182 -0.0 -0.134107 -0.175189 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.049415 -0.0 0.139727 -0.0 0.029609 -0.001452 -0.026230 -0.0 0.011992 0.036314 -0.000074 0.032367 0.039500 0.036314 -0.000836 0.005772 0.005772 -0.0 0.006450 0.005076 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 0.000724 -0.010546 0.118093 -0.0 -0.0 -0.0 -0.0 -0.0 0.063594 -0.012051 0.019572 -0.067867 -0.047615 0.006432 -0.035581 -0.008530 0.003469 0.020018 -0.007049 -0.021222 -0.035259 0.000708 -0.022600 -0.101570 -0.118776 -0.055221 -0.031659 -0.089724 -0.025832 -0.161236 -0.117220 -0.142956 -0.046711 0.024060 -0.023413 0.028066 0.031141 -0.072017 0.057011 0.019739 -0.083357 -0.022868 -0.016470 -0.107639 -0.087287 0.038265 -0.013059 -0.002777 0.004962 -0.041452 -0.062237 0.014589 0.063053 0.039530 0.087161 0.015202 0.105475 0.108501 0.034434 -0.004215 -0.090672 0.158822 0.155846 -0.017967 -0.004179 0.179098 -0.030049 -0.060296 0.004310 -0.082852 0.051327 0.138182 -0.041152 -0.020716 0.104402 -0.0 0.063293 -0.011568 0.020512 -0.068028 -0.046495 0.009387 -0.036065 -0.008305 0.003409 0.020995 -0.006684 -0.019518 -0.035183 0.001436 -0.021723 -0.097348 -0.120100 -0.055351 -0.032459 -0.089125 -0.025949 -0.163205 -0.117852 -0.144925 -0.047722 0.024957 -0.023598 0.028793 0.031323 -0.072444 0.056156 0.018122 -0.078593 -0.021375 -0.016501 -0.107952 -0.086560 0.037996 -0.012322 -0.002841 0.003315 -0.044061 -0.064218 0.007895 0.063623 0.040998 0.086370 0.014759 0.107342 0.108748 0.035220 -0.001217 -0.101133 0.159759 0.156709 -0.018484 -0.006757 0.178954 -0.029026 -0.060478 0.004285 -0.083640 0.051736 0.138007 -0.036688 -0.026776 0.127430 -0.0 -0.0 0.050636 0.075515 0.004112 -0.023481 0.008620 0.034013 -0.013003 -0.071649 -0.114943 0.011646 -0.051948 -0.013036 0.039021 -0.0 -0.042561 -0.011836 -0.019821 -0.008228 -0.0 -0.0 -0.0 0.063428 0.151416 -0.0 -0.0 0.025468 -0.008786 0.026361 0.016305 -0.042277 0.002868 0.031481 0.013469 -0.000843 -0.025336 -0.025336 -0.025044 -0.025618 0.016091
4 0.004716 -1.430180e-16 -5.434954e-17 -8.392303e-17 7.696711e-17 -5.979270e-17 0.002666 0.000115 0.001389 0.021637 -5.969440e-17 -1.000038e-16 0.042541 0.006503 2.588828e-17 0.037708 -0.023944 1.826221e-17 -5.516496e-17 -3.158504e-17 -7.126614e-18 2.379529e-17 -0.001835 -0.001835 -0.001079 -0.002547 1.012482e-17 -3.062674e-17 -3.047211e-17 3.380177e-17 -4.464840e-18 6.540691e-18 -5.002371e-17 5.190371e-18 -1.877184e-17 -9.274039e-19 -5.063075e-19 -1.451145e-17 -2.960811e-18 -2.194715e-17 1.746023e-17 8.405538e-18 -1.148994e-18 4.534027e-18 -8.346499e-18 2.591063e-19 -1.549356e-18 -0.013421 -0.003895 0.014448 -0.0 -0.037604 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.024591 -0.0 -0.020505 -0.012579 -0.003640 -0.0 -0.0 -0.0 0.052477 -0.000804 -0.004223 0.019977 0.030445 -0.026840 -0.0 -0.0 -0.007608 -0.0 -0.0 0.001389 0.021917 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.009209 0.006807 -0.0 -0.0 -0.0 -0.180702 -0.0 -0.183090 -0.206424 -0.0 -0.175900 0.111883 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.015232 -0.0 -0.000609 -0.0 0.001969 -0.014887 0.028886 -0.0 0.015681 0.028646 -0.007321 0.030711 0.027023 0.028646 0.004105 -0.017183 -0.017183 -0.0 -0.014958 -0.019338 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.006184 0.011599 0.003413 -0.0 -0.0 -0.0 -0.0 -0.0 0.026977 0.073637 0.067760 0.058773 -0.067721 -0.007285 -0.021224 -0.004469 0.062308 0.087876 -0.016289 0.036441 -0.006380 -0.031238 0.024200 0.015971 0.008675 0.084179 -0.013023 0.081733 0.048306 -0.214261 0.222455 -0.101440 0.088093 -0.003817 -0.008353 -0.038698 0.038793 -0.060747 -0.099683 -0.015027 -0.017912 0.017568 0.028049 -0.046073 -0.012666 0.050067 -0.173576 -0.001848 -0.054285 -0.208127 0.014619 0.007151 -0.148172 -0.143806 -0.076754 -0.110897 -0.137987 0.027116 0.039536 -0.029703 -0.004117 0.040295 0.027499 0.092501 -0.061497 0.014700 0.000639 0.025643 0.022872 0.030146 0.022074 -0.054885 0.053665 0.080355 0.003059 -0.0 0.026535 0.074670 0.069085 0.059135 -0.069760 -0.008299 -0.019740 -0.004229 0.062245 0.087860 -0.016967 0.040069 -0.004271 -0.027570 0.024083 0.016790 0.011181 0.087332 -0.010615 0.083171 0.050282 -0.212491 0.221414 -0.099466 0.091350 0.000063 -0.008181 -0.037953 0.038919 -0.061458 -0.098551 -0.013801 -0.016816 0.020193 0.028182 -0.044125 -0.008362 0.049741 -0.171934 -0.001856 -0.053998 -0.206596 0.015718 0.011897 -0.147152 -0.143143 -0.075278 -0.108774 -0.139947 0.029311 0.040851 -0.028016 -0.006270 0.041770 0.029302 0.094845 -0.056585 0.015553 0.000138 0.025403 0.022012 0.029312 0.014971 -0.050310 0.047915 0.067537 -0.057710 -0.0 -0.0 0.029579 0.026103 0.031212 0.050535 0.018911 0.056165 -0.003675 0.041201 0.084287 -0.005597 0.021186 -0.056053 0.037368 -0.0 0.039777 0.016025 -0.039613 -0.041406 -0.0 -0.0 -0.0 -0.165740 -0.129932 -0.0 -0.0 -0.032208 0.009972 -0.018506 -0.006533 0.000783 -0.028449 0.007487 -0.014164 0.004104 0.017963 0.017963 0.017518 0.018443 -0.019350
In [46]:
# Top 10 loading scores of PC1
loading_scores = pd.Series(data=pca_statetest.components_[0], index = test_newstate_df.columns)
sorted_loading_scores = loading_scores.abs().sort_values(ascending=False)
top_10 = sorted_loading_scores[0:10].index.values
print(loading_scores[top_10])
OWNER_CY      0.087039
VALBASE_CY    0.087039
HINC35_CY     0.086732
FEM75_CY      0.086474
MALE80_CY     0.086432
OLDRGENSCY    0.086322
ASSCDEG_CY    0.086244
NONHISP_CY    0.086238
POP80_CY      0.086152
WIDOWED_CY    0.085940
dtype: float64

These loading score values are very similar which means a lot of the variables played a role in creating the principal component. The loading score details can be seen in dataframe of components above. The composition also tells us that our component is not depend on a few variables but many variables were used.

Correlation Plot of first 5 PC

In [47]:
sns.set(rc={'figure.figsize':(32,8.27)})
sns.heatmap(pca_statetest.components_[0:4], xticklabels=test_newstate_df.columns, annot=True)
Out[47]:
<matplotlib.axes._subplots.AxesSubplot at 0x2025bc56400>
In [ ]:
 

Clustering

The idea of clustering is to find out if observations in the data naturally group together in some predictable way. In our case, we want to know if there is natural grouping that distinguishes some states from others. Standardization - most cluster analysis algorithms depend on the concept of measuring the distance between the different observations we're trying to cluster. If one of the variables is measured on a much larger scale than the other variables, then whatever measure we use will be overly influenced by the variable that has larger scale. So, we standardize our data to bring all variables to the same scale.

k-means

In [448]:
test_newstate_df.head()
# test_newstate_df[(test_newstate_df[[0, 1]] < 0).all(1)]
# test_newstate_df[(test_newstate_df.iloc[:,:] < 0).all(1)]
Out[448]:
Provider_Count AAGEBASECY AGGDI_CY AGGHINC_CY AGGINC_CY AGGNW_CY AIFBASE_CY AIMBASE_CY AMERIND_CY AREA ASIAN_CY ASNFBASECY ASNMBASECY ASSCDEG_CY AVGDI_CY AVGFMSZ_CY AVGHHSZ_CY AVGHINC_CY AVGNW_CY AVGVAL_CY BABYBOOMCY BACHDEG_CY BAGEBASECY BLACK_CY BLKFBASECY BLKMBASECY CIVLBFR_CY EDUCBASECY EMP_CY FAMHH_CY FAMPOP_CY FEM0_CY FEM15_CY FEM18UP_CY FEM20_CY FEM21UP_CY FEM25_CY FEM30_CY FEM35_CY FEM40_CY FEM45_CY FEM50_CY FEM55_CY FEM5_CY FEM60_CY FEM65_CY FEM70_CY FEM75_CY FEM80_CY FEM85_CY FEMALES_CY GED_CY GENALPHACY GENBASE_CY GENX_CY GENZ_CY GQPOP_CY GRADDEG_CY HAGEBASECY HHPOP_CY HINC0_CY HINC150_CY HINC15_CY HINC25_CY HINC35_CY HINC50_CY HINC75_CY HINCBASECY HISPAI_CY HISPASN_CY HISPBLK_CY HISPMLT_CY HISPOTH_CY HISPPI_CY HISPPOP_CY HISPWHT_CY HSGRAD_CY HSPFBASECY HSPMBASECY IAGEBASECY LANDAREA MAL18UP_CY MAL21UP_CY MALE0_CY MALE15_CY MALE20_CY MALE25_CY MALE30_CY MALE35_CY MALE40_CY MALE45_CY MALE50_CY MALE55_CY MALE5_CY MALE60_CY MALE65_CY MALE70_CY MALE75_CY MALE80_CY MALE85_CY MALES_CY MARBASE_CY MARRIED_CY MEDAGE_CY MEDDI_CY MEDFAGE_CY MEDHHR_CY MEDHINC_CY MEDMAGE_CY MEDNW_CY MEDVAL_CY MILLENN_CY MINORITYCY MLTFBASECY MLTMBASECY NEVMARR_CY NHSPAI_CY NHSPASN_CY NHSPBLK_CY NHSPMLT_CY NHSPOTH_CY NHSPPI_CY NHSPWHT_CY NOHS_CY NONHISP_CY OAGEBASECY OLDRGENSCY OTHFBASECY OTHMBASECY OTHRACE_CY OWNER_CY PACIFIC_CY PAGEBASECY PCI_CY PIFBASE_CY PIMBASE_CY POP0_CY POP15_CY POP18UP_CY POP20_CY POP21UP_CY POP25_CY POP30_CY POP35_CY POP40_CY POP45_CY POP50_CY POP55_CY POP5_CY POP60_CY POP65_CY POP70_CY POP75_CY POP80_CY POP85_CY POPDENS_CY RACE2UP_CY RACEBASECY RENTER_CY SMCOLL_CY SOMEHS_CY TADULT01 TADULT02 TADULT03 TADULT04 TADULT05 TADULT06 TADULT07 TADULT08 TADULT09 TADULT11 TADULT12 TADULT13 TADULT14 TADULT15 TADULT16 TADULT17 TADULT18 TADULT19 TADULT20 TADULT21 TADULT22 TADULT23 TADULT24 TADULT25 TADULT26 TADULT27 TADULT28 TADULT29 TADULT30 TADULT31 TADULT32 TADULT33 TADULT34 TADULT35 TADULT36 TADULT37 TADULT38 TADULT39 TADULT40 TADULT41 TADULT42 TADULT43 TADULT44 TADULT45 TADULT46 TADULT47 TADULT48 TADULT49 TADULT50 TADULT51 TADULT52 TADULT53 TADULT54 TADULT55 TADULT56 TADULT57 TADULT58 TADULT59 TADULT60 TADULT61 TADULT62 TADULT63 TADULT64 TADULT65 TADULT66 TADULT67 TADULT68 TADULTBASE THH01 THH02 THH03 THH04 THH05 THH06 THH07 THH08 THH09 THH11 THH12 THH13 THH14 THH15 THH16 THH17 THH18 THH19 THH20 THH21 THH22 THH23 THH24 THH25 THH26 THH27 THH28 THH29 THH30 THH31 THH32 THH33 THH34 THH35 THH36 THH37 THH38 THH39 THH40 THH41 THH42 THH43 THH44 THH45 THH46 THH47 THH48 THH49 THH50 THH51 THH52 THH53 THH54 THH55 THH56 THH57 THH58 THH59 THH60 THH61 THH62 THH63 THH64 THH65 THH66 THH67 THH68 THHBASE THHGRPL1 THHGRPL11 THHGRPL12 THHGRPL13 THHGRPL14 THHGRPL2 THHGRPL3 THHGRPL4 THHGRPL5 THHGRPL6 THHGRPL7 THHGRPL8 THHGRPL9 THHGRPU1 THHGRPU2 THHGRPU3 THHGRPU4 THHGRPU5 THHGRPU6 TOTHH_CY TOTHU_CY TOTPOP_CY TSEGNUM UNEMPRT_CY UNEMP_CY VACANT_CY VAL0_CY VAL150K_CY VAL1M_CY VAL1PT5MCY VAL250K_CY VAL2M_CY VAL50K_CY VAL750K_CY VALBASE_CY WAGEBASECY WHITE_CY WHTFBASECY WHTMBASECY WIDOWED_CY
0 7353.0 5808539 984770070408 1341852609490 1363545956974 10953288740347 186300 188412 374712 158042.920912 5808539 3057816 2750723 2056384 73844 3.50 2.92 100620 821339 637422 8055682 5552919 2345048 2345048 1186331 1158717 19595308 26629106 18678853 9166028 32063051 1246195 1267704 15535129 1399534 14709444 1533458 1442776 1332317 1220853 1252603 1262625 1290328 1247274 1173091 1008278 746364 527232 362402 447803 20024285 621048 1008060 39806791 8011720 9289070 813593 3342632 15757962 38993198 1280615 1084396 1102410 1036596 1486913 2149782 1630222 13335897 214901 94837 149373 953706 7017528 17243 15757962 7310374 4804568 7811593 7946369 374712 155779.2198 15076422 14203971 1298461 1348980 1481021 1618901 1503701 1378564 1227529 1251002 1245261 1228175 1301504 1076510 891235 637267 427533 272897 270401 19782506 32126345 15627854 36.2 56020 37.3 51.5 69051 35.1 99297 505800 10636136 25228888 1076167 1053726 11926897 159811 5713702 2195675 1176187 84542 141009 14577903 2557052 24048829 7102070 2806123 3484353 3617717 7102070 7294468 158252 158252 34254 79878 78374 2544656 2616684 30611551 2880555 28913415 3152359 2946477 2710881 2448382 2503605 2507886 2518503 2548778 2249601 1899513 1383631 954765 635299 718204 255.5 2129893 39806791 6041636 5627462 2067041 962752 447008 877339 707623 1030736 998289 1614673 1324877 854053 428180 1051926 640890 507501 147970 237918 290669 232487 111099 175840 175248 27484 508845 34216 94745 26920 657657 2654588 898660 530885 587455 321133 1177243 208733 337293 394628 476335 299210 59480 140493 366232 156521 289040 189701 202710 74475 54655 10628 210357 24920 79246 244837 409205 166215 21790 118065 25748 113377 9029 1432303 1875298 534518 504305 79548 103401 172871 214308 121327 30611551 435771 183824 367891 297569 476909 507339 673663 508597 428604 259020 577307 263847 213335 66627 109074 143993 108873 52243 85167 78061 12137 244469 15552 49244 13249 260783 911215 362738 195394 210403 128040 543776 111747 169541 165386 226491 161769 28909 76061 193740 98928 146079 107181 112822 31553 22139 5084 95731 9515 37825 135236 200618 89406 11253 50951 12199 59308 4548 605661 641139 209939 214632 38327 25756 76824 50008 179 13336104 1761964 474338 127006 1709698 152588 2118203 1161232 543809 499350 412712 2068573 1407619 734811 1827341 4374461 1267838 4807134 591397 467754 13336104 14383561 39806791 28 4.7 916455 1047457 190476 277000 678744 195039 432916 242837 160723 903689 7293065 21888277 21888277 10953440 10934837 1601462
1 5115.0 1428081 663797428676 846781778790 860166554925 6544101733836 99642 101050 200692 264622.431161 1428081 736438 691643 1352089 65007 3.36 2.78 82927 640876 234140 5610338 3595450 3554094 3554094 1837649 1716445 13994294 18710254 13323060 7102474 23868426 1012163 958641 11007087 1023650 10392959 1088542 1028122 990111 912087 908014 888197 906409 1016393 815633 699159 508500 349890 230272 255883 14596063 796406 820030 28954616 5795902 7332348 603396 1902087 11500677 28351220 1099136 601595 972153 998707 1339610 1837748 1220161 10211181 108000 21467 126710 446880 3229534 4993 11500677 7563093 3900291 5712914 5787763 200692 261231.7115 10619025 9978508 1049926 1010959 1068334 1146033 1057803 1000356 900336 893942 864949 855845 1054854 749300 623922 440199 284583 169339 142828 14358553 22771838 11608584 34.8 48504 35.8 49.5 57286 33.8 89454 173734 7624216 16954978 459123 454026 7616564 92692 1406614 3427384 466269 37515 23827 11999638 1572787 17453939 3267049 1771782 1571022 1696027 3267049 6286745 28820 28820 29707 14439 14381 2062089 1969600 21626112 2091984 20371467 2234575 2085925 1990467 1812423 1801956 1753146 1762254 2071247 1564933 1323081 948699 634473 399611 398711 110.8 913149 28954616 3924542 4037002 1554142 257841 546026 1102103 504579 298473 141680 25966 3941 232406 435495 27305 751696 718565 539687 401342 297639 111651 342816 282798 522498 225754 193715 190129 160088 240532 1662778 199271 827432 1492651 7383 1369349 27222 182557 574840 1656 145357 286509 195161 82795 95111 17082 114932 97451 70012 854973 411283 295295 344420 112278 4120 700747 410891 133118 94734 161445 243184 227922 183344 38365 84691 621868 44070 24312 72359 201481 199469 60997 21626112 124524 236631 510390 229203 148579 78268 11804 1715 123382 270425 15874 334179 322524 256069 194257 156003 54214 166876 141026 242077 106842 94754 92548 81196 118859 746527 76855 359005 603599 3263 582375 10984 106059 311328 831 73537 158365 91562 43855 55012 10078 56954 56138 36794 392512 198958 135159 153282 47834 2198 438819 218771 73760 51764 73393 116283 113907 88717 18279 32041 289865 21319 12423 18523 95654 64280 157 10211287 1249327 785312 392300 373927 178457 215169 344348 912772 712376 736276 2371624 752666 258831 670984 2543938 1519018 3382976 702334 1391880 10211287 11236543 28954616 27 4.8 671234 1025256 561071 985102 66551 15750 527935 20493 1095680 94609 6285595 19562731 19562731 9877750 9684981 1165365
2 5005.0 1774868 494056143933 721252426439 733561461654 5780147040071 57206 55978 113184 48359.759399 1774868 920657 854211 1234468 65662 3.27 2.59 95857 768205 451725 4524627 2844992 3202872 3202872 1720637 1482235 10297331 13980509 9750809 4711535 15422531 541010 622797 8316966 692667 7896904 736087 711718 665428 617325 653985 691792 725143 555213 671105 583941 447188 321376 227864 297383 10347030 556396 439969 20070143 4071725 4262278 575494 2207562 3920105 19494649 910026 562411 659740 628211 822195 1168671 908502 7524226 58228 16280 331729 299313 1562083 3773 3920105 1648699 3075758 1994498 1925607 113184 47126.3986 7603630 7176760 563187 645491 694720 735814 699391 649639 591431 624744 651555 664052 578913 595536 496269 361798 245015 158479 156451 9723113 16636184 7732110 39.0 51058 40.5 53.2 63751 37.6 87167 322649 5071787 9104863 369440 340441 6469341 54956 1758588 2871143 410568 83316 6187 10965280 866788 16150038 1645399 1699757 825459 819940 1645399 3928983 9960 9960 36550 5029 4931 1104197 1268288 15920596 1387387 15073664 1471901 1411109 1315067 1208756 1278729 1343347 1389195 1134126 1266641 1080210 808986 566391 386343 453834 425.9 709881 20070143 3595416 2182364 1012181 512090 105026 4623 566085 222285 250800 1375859 372083 36331 199329 565803 94595 113012 39543 373383 232188 170661 324706 344500 271067 329966 269307 19946 113275 239738 665 189396 20342 1016 1005 2888 696353 107184 38266 1333128 73019 173289 194976 25993 345965 23485 24115 145463 144351 204688 104636 1156 28446 11960 1150953 23619 17471 149676 107735 83723 278978 126444 50178 647696 52872 63074 73315 1056586 17171 106449 111054 39680 15920596 227930 45156 1971 245731 101807 129891 578041 153655 19294 114087 297684 42464 49670 19702 178348 115820 85493 169528 177703 127239 155409 132719 9562 57642 120941 284 63030 8326 352 535 1156 332041 60446 20774 569263 37915 95602 102941 13893 191240 11264 12914 83122 86221 98353 50421 584 14648 1916 521013 13514 9730 84095 58870 42581 150061 70282 28208 261620 17305 24745 34054 494486 4732 41867 10397 263 7524399 622595 687222 291132 832210 56996 880881 853619 111836 726892 603512 73683 1218982 398654 2497180 1108306 940871 2104912 239022 633845 7524399 8391638 20070143 7 5.3 546522 867239 152062 379625 179685 56246 246121 99717 374729 263656 3926227 12613979 12613979 6448602 6165377 977829
3 4133.0 585936 487005072197 613723856820 624450149363 6548612367402 40665 42463 83128 56491.338012 585936 316402 269534 1468305 59737 3.03 2.51 75281 803267 282862 5125816 2763015 3423250 3423250 1775199 1648051 9939670 14984858 9428446 5273287 15994410 540535 575794 8672285 647413 8288558 693040 652863 622949 602161 654907 696088 756439 556332 740359 711079 574407 426317 297361 348670 10667264 630616 434241 20875686 4066365 4142104 433652 1591194 5399203 20442034 951439 366646 868205 873200 1196903 1521148 970483 8152474 30738 13113 201778 241103 848135 3477 5399203 4060859 3663685 2732325 2666878 83128 53624.7587 8132434 7737236 561572 604324 667070 728403 671610 629910 591323 640640 666976 693978 574960 651105 617390 497457 358273 236773 224380 10208422 17479459 8404539 42.3 43866 43.9 55.4 52098 40.6 98640 212954 4819710 9694483 320999 306853 5579880 52390 572823 3221472 386749 50104 11742 11181203 770061 15476483 898239 2287450 433750 464489 898239 5193134 15219 15219 29913 7485 7734 1102107 1180118 16804719 1314483 16025794 1421443 1324473 1252859 1193484 1295547 1363064 1450417 1131292 1391464 1328469 1071864 784590 534134 573050 389.3 627852 20875686 2959407 2990780 1107202 139564 203442 252298 342663 283344 129690 129485 3407 78849 131796 30196 479436 544452 543860 408053 288055 142999 417240 573770 261579 85398 333616 2029 115622 143470 540715 227391 933973 104898 70517 460679 56767 240719 452235 0 207742 413860 143688 644510 279740 779970 766863 377196 100898 428649 183680 8535 297341 166979 48101 323008 451913 233004 178840 285711 217009 234897 250408 90659 40210 127174 79439 13767 21497 103498 109161 20707 16804719 64080 84617 112750 150048 139641 68081 53419 1152 40455 79640 18059 206336 237762 248795 195362 149440 70108 204783 289645 118846 39620 162626 1011 60130 70532 238120 80416 393622 42245 27259 185836 27665 135609 234795 0 103443 231898 69296 347422 155361 465971 402057 222582 59214 190835 81384 3488 138256 62390 20779 187750 229070 131273 90284 117945 108972 124281 117164 41705 15882 54240 35494 7223 4930 49689 35423 57 8152541 551136 659156 468362 154544 90042 163107 111977 692893 909338 452765 967498 802706 1652607 229713 1692280 1574873 2924108 1011180 720330 8152541 9790195 20875686 42 5.1 511224 1637654 351168 819037 78889 20495 557404 36949 600047 111697 5192714 15242062 15242062 7772764 7469298 1199573
4 3210.0 462360 315983343213 411902114464 418518490501 4125980999869 16036 16102 32138 45285.896438 462360 240313 222047 749637 61749 3.02 2.46 80493 806294 236846 3167219 1763503 1470953 1470953 765013 705940 6619516 9125523 6217293 3282447 9921694 335276 404682 5362136 433612 5076349 410643 397480 389122 375532 411895 447624 487329 355242 461925 408531 312098 231110 173218 235227 6642616 345422 268314 12992598 2573675 2724068 426311 1120165 987581 12566287 549498 299343 505620 485138 661013 933563 649666 5117219 13841 4066 72801 81708 393883 1223 987581 420059 2817515 484730 502851 32138 44742.7032 5010352 4726214 349790 417152 441081 428491 405440 392100 371081 405311 435283 463856 369830 429073 366389 265594 180573 120018 120580 6349982 10822050 5289824 41.4 46696 43.0 54.9 57362 39.8 126527 185452 2988934 3115252 161589 152711 3726095 18297 458294 1398152 232592 16338 3998 9877346 286064 12005017 410221 1270388 195431 214790 410221 3463374 5221 5221 32212 2622 2599 685066 821834 10372488 874693 9802563 839134 802920 781222 746613 817206 882907 951185 725072 890998 774920 577692 411683 293236 355807 290.4 314300 12992598 1653953 1457813 585404 162479 224406 22707 432943 210046 93639 202612 1754 84748 134652 24943 212966 62172 134424 548302 271213 517207 239410 553292 575890 903871 107575 38382 88283 504795 7672 14931 45556 6099 2557 6112 108325 136072 71952 14130 273695 196055 165969 5495 221381 17439 19227 190704 111879 144975 257849 36862 11142 18502 63122 23301 34327 146156 125056 113432 220217 317061 254390 17469 0 2886 271578 15924 0 143081 121146 29470 10372488 74277 98686 10729 196059 101319 45957 93730 645 45424 82738 12942 99476 28229 66028 267265 135979 258794 127103 278212 269579 435594 52290 18313 44342 263868 3585 6189 20132 2629 902 2884 53850 73109 39839 6765 137745 110110 84780 2896 116222 10022 10151 101801 66453 70968 124551 18223 5868 6096 31133 14285 17713 80722 66212 56799 116780 175679 129971 7816 0 1255 123001 7629 0 57457 25114 82 5117327 481070 210065 479229 139701 82571 185756 118011 193733 1067353 1083986 36321 506198 307545 287794 465570 1070547 1730882 522496 1039956 5117327 5703807 12992598 22 6.1 402223 586480 222750 599167 27840 4755 326829 6624 516090 45734 3463173 10297405 10297405 5261612 5035793 725053

Determine optimal clusters using within cluster SSE

In [30]:
# Check if any values are 0 in the dataframe
# test_newstate_df.isnull().values.any()
test_newstate_df.columns[test_newstate_df.eq(0).any()].tolist()
Out[30]:
['TADULT01',
 'TADULT02',
 'TADULT03',
 'TADULT04',
 'TADULT05',
 'TADULT06',
 'TADULT07',
 'TADULT08',
 'TADULT09',
 'TADULT11',
 'TADULT12',
 'TADULT13',
 'TADULT14',
 'TADULT15',
 'TADULT16',
 'TADULT17',
 'TADULT18',
 'TADULT19',
 'TADULT20',
 'TADULT21',
 'TADULT22',
 'TADULT23',
 'TADULT24',
 'TADULT25',
 'TADULT26',
 'TADULT27',
 'TADULT28',
 'TADULT29',
 'TADULT30',
 'TADULT31',
 'TADULT32',
 'TADULT33',
 'TADULT34',
 'TADULT35',
 'TADULT36',
 'TADULT37',
 'TADULT38',
 'TADULT39',
 'TADULT40',
 'TADULT42',
 'TADULT43',
 'TADULT44',
 'TADULT46',
 'TADULT47',
 'TADULT48',
 'TADULT49',
 'TADULT50',
 'TADULT51',
 'TADULT52',
 'TADULT53',
 'TADULT55',
 'TADULT56',
 'TADULT57',
 'TADULT58',
 'TADULT59',
 'TADULT60',
 'TADULT61',
 'TADULT62',
 'TADULT63',
 'TADULT64',
 'TADULT65',
 'TADULT67',
 'TADULT68',
 'THH01',
 'THH02',
 'THH03',
 'THH04',
 'THH05',
 'THH06',
 'THH07',
 'THH08',
 'THH09',
 'THH11',
 'THH12',
 'THH13',
 'THH14',
 'THH15',
 'THH16',
 'THH17',
 'THH18',
 'THH19',
 'THH20',
 'THH21',
 'THH22',
 'THH23',
 'THH24',
 'THH25',
 'THH26',
 'THH27',
 'THH28',
 'THH29',
 'THH30',
 'THH31',
 'THH32',
 'THH33',
 'THH34',
 'THH35',
 'THH36',
 'THH37',
 'THH38',
 'THH39',
 'THH40',
 'THH42',
 'THH43',
 'THH44',
 'THH46',
 'THH47',
 'THH48',
 'THH49',
 'THH50',
 'THH51',
 'THH52',
 'THH53',
 'THH55',
 'THH56',
 'THH57',
 'THH58',
 'THH59',
 'THH60',
 'THH61',
 'THH62',
 'THH63',
 'THH64',
 'THH65',
 'THH67',
 'THH68',
 'THHGRPL13',
 'THHGRPL2',
 'THHGRPL3',
 'THHGRPL4',
 'THHGRPL5',
 'THHGRPL6',
 'THHGRPL7',
 'THHGRPU1',
 'THHGRPU5',
 'THHGRPU6']
In [454]:
test_newstate_df['MEDHINC_CY'] = test_newstate_df['MEDHINC_CY'].astype(float)
type(test_newstate_df['MEDHINC_CY'][0])
Out[454]:
numpy.float64
In [28]:
# Transform Data
from sklearn.preprocessing import PowerTransformer
pt_state = PowerTransformer(method='yeo-johnson')
newstate_df_pt = pt_state.fit_transform(test_newstate_df)
C:\Users\mohi9282\AppData\Local\Continuum\anaconda3\envs\arcgis\lib\site-packages\sklearn\preprocessing\data.py:2863: RuntimeWarning: divide by zero encountered in log
  loglike = -n_samples / 2 * np.log(x_trans.var())
In [48]:
from sklearn.cluster import KMeans
sns.set(rc={'figure.figsize':(15,8)})
distortions = []
for i in range(1,20):
    km = KMeans(n_clusters=i,
                init='k-means++',
                n_init=10,
                max_iter=300,
                random_state=0)
    km.fit(newstate_df_pt)
    distortions.append(km.inertia_)
    
plt.plot(range(1,20), distortions, marker='o')
plt.xlabel('No. of Clusters')
plt.ylabel('Within Cluster Sum of Squares')
plt.show()

Run KMeans with 4 clusters

In [55]:
sns.set(rc={'figure.figsize':(15,8)})
from sklearn.cluster import KMeans
kmeans = KMeans(n_clusters=4)
# Fit the data
kmeans.fit(newstate_df_pt)
# Get the cluster labels
y_pred = kmeans.predict(newstate_df_pt)
# plot the cluster assignments and cluster centers
# newstate_df_std[:,0] includes all values for Provider Count and so on... #103 is MEDAGE_CY
plt.scatter(newstate_df_pt[:, 0], newstate_df_pt[:,103], c=y_pred, cmap="plasma")
plt.scatter(kmeans.cluster_centers_[:, 0],   
            kmeans.cluster_centers_[:, 103],
            marker='^', 
            c=[0,1,2,3], 
            s=100, 
            linewidth=2,
            cmap="plasma")
plt.xlabel("Feature 0")
plt.ylabel("Feature 1")
Out[55]:
Text(0, 0.5, 'Feature 1')
In [56]:
kmeans.cluster_centers_
Out[56]:
array([[ 0.32717284,  0.        ,  0.        , ...,  0.25436349,
         0.26167897,  0.14226632],
       [-1.24494478,  0.        ,  0.        , ..., -1.25310715,
        -1.25743991, -1.25824838],
       [ 1.3453939 ,  0.        ,  0.        , ...,  1.31024149,
         1.30931671,  1.33246836],
       [-0.06460048,  0.        ,  0.        , ...,  0.0221897 ,
         0.02154708,  0.09289306]])
In [57]:
kmeans.labels_
Out[57]:
array([2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 0, 0, 3, 0, 0, 3, 3, 0, 3, 0,
       3, 0, 3, 3, 3, 0, 3, 3, 0, 0, 3, 3, 3, 3, 1, 3, 1, 1, 1, 1, 1, 1,
       1, 1, 1, 1, 1, 1, 1])

Identify which states belong to what cluster

In [75]:
# Create dataframe of Cluster labels and State Names
clusterdf = pd.DataFrame(kmeans.labels_, newstate_obgyn_df['RegionAbbr'])
clusterdf.reset_index(inplace=True)
clusterdf.columns = ['Region','Cluster']
clusterdf.head()
Out[75]:
Region Cluster
0 CA 2
1 TX 2
2 NY 2
3 FL 2
4 PA 2
In [76]:
# Count of states in each cluster
clusterdf['Cluster'].value_counts()
Out[76]:
3    15
1    14
2    11
0    11
Name: Cluster, dtype: int64
In [73]:
# States in each cluster
clusterdf.groupby('Cluster')['Region'].apply(list)
Out[73]:
Cluster
0         [NJ, MA, MD, WA, AZ, CO, CT, MN, OR, NV, UT]
1    [HI, WV, DC, RI, NH, ID, DE, ME, MT, AK, VT, S...
2         [CA, TX, NY, FL, PA, IL, MI, OH, GA, NC, VA]
3    [MO, IN, TN, SC, LA, WI, KY, AL, OK, MS, KS, I...
Name: Region, dtype: object
In [358]:
sns.set(rc={'figure.figsize':(32,8.27)})
sns.heatmap(kmeans.cluster_centers_[0:4], xticklabels=test_newstate_df.columns, annot=True)
Out[358]:
<matplotlib.axes._subplots.AxesSubplot at 0x1f4c219fd68>